Possible duplicates:
Objective-C - float check for nan
Determine if NSNumber NaN
I have a problem with NaN values ββin CGFloat, how can I check if the number is correct?
so far the only way that works:
if ([[NSString stringWithFormat:@"%f", output] isEqualToString:@"nan"]) { output = 0; }
which is not a good solution at all! :) ... and I'm sure there is something else that I should do instead.
ios objective-c iphone xcode cgfloat
Ondrej Jun 02 2018-11-11T00: 00Z
source share