Although my question is not 100% OpenGL related, I stumbled across this problem when modifying example code from NeHe’s tutorials.
Using Visual C++ 6 (SP4) I decremented a GLfloat variable (initialized with 1.0f) by 0.1f until it is 0.0f. When the variable was 0.2f and then was decremented by 0.1f, the result was 0.999999f (and not 0.1f as it should have been).
Has anyone a hint or a workaround for this? Should I round the result (how?).
Thanks in advance,