Skip to content

Instantly share code, notes, and snippets.

@aug2uag
Created January 15, 2014 07:04
Show Gist options
  • Select an option

  • Save aug2uag/8432061 to your computer and use it in GitHub Desktop.

Select an option

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