I don't know what happen but when I use array C2 say:
0.05 + 0.01 = 0.060000000000000005
Develop games in your browser. Powerful, performant & highly capable.
That's the problem with floating point numbers...
And is there any easy solution?
Stick with integers and divide by 100 only when you need to get the value as a decimal.
most certainly not the best way...but
Like blackhornet said, work with integers:
Thanks for all your comments.
I decide to use the *100 /100 solution, but adding a round().
With this I can use the array and I don't need to worry every time to add a /100