Ok, so I use math.ceil somewhere in a function. Today I noticed a bug and I isolated the culprit :
**Math.ceil(numToFormat * 100)
**I found the problem and a workaround for this already but I’m stil curious to why this happens.
Try the following code:
var numToFormat:Number = 2.49;
trace(numToFormat);
trace(numToFormat * 100);
trace(Math.ceil(numToFormat * 100));
The result you will see in the output is
2.49
249.00000000000003
250
Why does flash think that 2.49 multiplied by 100 is 249.00000000000003 ?