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.
float(tokenAt("1/4", 0, "/")) / float(tokenAt("1/4", 1, "/"))
float(tokenAt("5/10", 0, "/")) / float(tokenAt("5/10", 1, "/"))
Develop games in your browser. Powerful, performant & highly capable.
thats pretty slick. nice
Thank you. Works perfectly