In Objective C, how can I check if value is integer number like 2.000 , 3.000, 8.000 stored as a float, and not a fraction like 2.456, 3.578
I think you're asking how to find out if a number stored as a float
is an integer. There are a number of techniques. Here's one:
if(fVal == floorf(fVal))
... // do something
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments