#I'm getting very long decimals that shouldn't happen

6 messages · Page 1 of 1 (latest)

frail cypress
#

Hi I want this

tostring(math.round(sliderValue * 10^2)) * 10^-2 * 100

to return me numbers between 1 and 100, but instead it gives me stuff like 70.000000001 on certain integers? any way to fix this?

signal hinge
frail cypress
#

cause its on a slider

#

i dont want random..

#

maybe i worded it wrong

signal hinge
#

Also the reason why you're getting non integer value is because you used * 10^-2 * 100 and i believe it's because some kind of floating point problem from the program. Also you could've math.floor it.