Comparing floats in general with == is often bogus, but 0.0 is a special case; division shows that there is a distinct difference between zero and approximately zero, and 0.0 is not just approximately zero.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-15 21:08: Subject: Re: float type weirdness
If float 0.0 is _not_ zero, then what it is?
The issue here is probably how you consider floats. I see 0.0 as a value that is aproximatly zero. I actually consider `== on floats useless and that 0==0.0 as a bug. After all 1!=1.0 so why should 0==0.0?
/ Martin Nilsson (saturator)