Objective-C - float checking for nan

Viewed 45890

I have a variable float slope that sometimes will have a value of nan when printed out since a division by 0 sometimes happens.

I am trying to do an if-else for when that happens. How can I do that? if (slope == nan) doesn't seem to work.

4 Answers
Related