I have this line:
for (var j = 0; j<1; j = (j + 0.1).toPrecision(1))
I am trying to tune this statement to get 0, 0.1, 0.2, 0.3 to number 1.
At the moment, I get 0, 0.1, and then nothing, as if the result goes right through 1,
Just using j = j + 0.1, you get rounding errors, and I need the exact decimal place.
Any suggestions?
Ysol8 source
share