Skip to content

Instantly share code, notes, and snippets.

@n9986
Created September 7, 2012 08:48
Show Gist options
  • Save n9986/3664438 to your computer and use it in GitHub Desktop.
Save n9986/3664438 to your computer and use it in GitHub Desktop.
Quick method to check if a number is whole or not
-(BOOL)isWholeNumber:(double)number
{
double integral;
double fractional = modf(number, &integral);
return fractional == 0.00 ? YES : NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment