floating point operations will guarantee this will fail when you don't expect it to, when the values round to the same integer, except the floating difference is some tiny fraction. `if (distance < 0.1)` is generally safer.