It would be good to do the comparison against the float epsilon here, as comparing floats is generally unsafe 8).