Is it bugging? My number isn't going up properly

So when I click spacebar it goes into a number that is 0.1 and adds it to a number sittinga t 0, but after I click a couple times it value in the number that has the speed value goes to ruffly 0.399999999991 something like that. If you guys could test it and give me a solution I would be very appreciative. Thanks guys


idk if the image showed up, the behaviours are in (player)

1 Like

Oh, never mind. Yeah, the number 0.1 adds 0.0000000001 after a while… Give me a sec…


Use this. Have the number set to a whole 1, and then divided by 10 when it’s inputted into the other behaviors.

It’s not a Flowlab issue, computers are just really bad at math. They make calculations so fast they often make micro mistakes several decimal places down, which most calculators would auto correct. So you could just do something like Math.floor(A*10)/10
Just increase the 0’s for the number of decimal places you want

2 Likes

Thanks guys, this helps a lot, I didn’t know the calculators worked that fast that it did that.

1 Like