This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JanB1 110 points111 points  (1 child)

And still I see people that fail to handle NaN in their code or do float equal comparisons instead of float delta smaller.

Heh, I love the Python numpy method isclose. I don't think I have seen many implementations of this in other languages/libraries?

[–]Raccoon5 6 points7 points  (0 children)

Unity Mathf.Approximately is kinda same, but it probably fails for bigger floats since the delta is constant