> and how do i fix this?
Realise that all floats are approximate, including their visual representations.
So you might be seeing 1.234 and 1.234 when you print out the values in the debugger / printf, but that doesn't mean that the == test is automatically true.
What you might really have is 1.2340000001 and 1.2340000002
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.