Skip to content

Instantly share code, notes, and snippets.

@aug2uag
Created January 15, 2014 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aug2uag/8432061 to your computer and use it in GitHub Desktop.
Save aug2uag/8432061 to your computer and use it in GitHub Desktop.
Random NSNumber in range
+ (NSNumber *)randomNumberFromRangeMax:(NSInteger)aMax Min:(NSInteger)aMin
{
return [NSNumber numberWithInt:(int)(rand() % (aMax - aMin + 1) + aMin)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment