I don't know what happen but when I use array C2 say:
0.05 + 0.01 = 0.060000000000000005
Example:
https://dl.dropboxusercontent.com/u/128712958/test.capx
Source code:
Result:
Thank you.
That's the problem with floating point numbers...
https://www.youtube.com/watch?t=68&v=PZRI1IfStY0
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
test.capx
Like blackhornet said, work with integers:
Develop games in your browser. Powerful, performant & highly capable.
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