Original Post
i am using vc++ and working with float numbers since i am working on a opengl project, the coordinates for a sprite is incremented by 0.1f (1 pixel). when I add something like x = x + 0.1f; there is a major loss in accuracy after a while. when values go to like 1.199999999 then worst like 1.32999999. Basically accuracy is always lost as i add more. is there any way to add float numbers accurately? I tried some previous suggestion on the forum, none worked. mine game is similar to that of pokemon and final fantasy where u move by tile. so if they press left, the character moves 1 whole tile (10 pixel). so i need add 0.1 – 10 times and they finally rounded in the end. when i do the rounded off in the end it causes the graphics to jerk when the value is rounded. Reason it jerks is because my camera is set to this value. So when I rounded off, the camera shifts by a little to the accurate amount. So my final ques is : is there a better way to work with accuracy with float?