IEEE floating point numbers have a bit assigned to indicate the sign, which means you can technically have different binary representations of zero (+0 and -0). Is there an
this float1 == 0.0f is never really a safe comparison.
float1 == 0.0f
if you have something like
float x = 0.0f; for (int i = 0; i < 10; i++) x += 0.1f; x -= 1.0f; assert (x == 0.0f);
it will fail even though it is seemingly supposed to be 0.