How can I change strings like "1/4" and "5/10" into floats 0.25 and 0.5?
I've tried to use expression float(), but float("1/4") returns 1, and float("5/10") returns 5.
Develop games in your browser. Powerful, performant & highly capable.
float(tokenAt("1/4", 0, "/")) / float(tokenAt("1/4", 1, "/"))
float(tokenAt("5/10", 0, "/")) / float(tokenAt("5/10", 1, "/"))
thats pretty slick. nice
Thank you. Works perfectly