- Legacy ID
Just do any basic subtraction against a floating point.
This shouldn't be an issue in a game engine in 2014.
I would really like you to read http://floating-point-gui.de/ and then understand that FP arithmetic will not ever return precise decimal results. That being said, I would really like to know the precision used in the game engine.
The Int calculation is somewhat puzzling though. That should not happen.
Looks like the game is using single precision: http://codepad.org/hcwPbKPf (I think you'll find a few game engines using single precision in 2014)
I am, of course, not implying that double precision would give exact answers, just the appearance of meeting expectations in these simple cases.