Hi,
Why when I insert a label and put in the code the text 4400/1.1 it returns 4000 and when I insert a text box and do the same calculation it returns me 3999,9999999999995?
Develop games in your browser. Powerful, performant & highly capable.
Because decimal math is hard for computers after a certain ...point, and the text object is optimised to take the least amount of work.
Both are correct as far as the computer cares. Format it yourself with int, round, ceil, etc.
en.wikipedia.org/wiki/Round-off_error
This is very interesting! Thank You.