How would I get the next value of 10
for example:
if the number is 1, the returned value is 10
or if the number is 16, the returned value is 20
or if the number is 45, the returned value is 50
Thanks, Lux
How would I get the next value of 10
for example:
if the number is 1, the returned value is 10
or if the number is 16, the returned value is 20
or if the number is 45, the returned value is 50
Thanks, Lux
result = math.floor((num+9)/10) * 10
Well, not sure if the other person’s will work, but here’s my version:
result = math.ceil(num/10)*10
XD I didn’t test it, but in my head it works
The absolute of 1.9 is 1.9 and multiplied by 10 is 19.
oh… lol, I meant math.floor (), not math.abs… my bad XD
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.