I have the following code:
double x = 0; { ...do stuff ...} if(x == 0){ }
I was always taught that you shouldn\'t check floats for equal
It is safe if the 0 you're trying to catch is the original 0 set at initialization. However, it isn't safe if you're expecting a 0 from a mathematical operation.