Comparing floating point with == or != is unsafe

That’s exactly it.

As you pointed out use approximatelyEqual() to silence the error. You can also use exactlyEqual() if you are absolutely sure you want an exact match.

3 Likes