Created
January 15, 2014 07:04
-
-
Save aug2uag/8432061 to your computer and use it in GitHub Desktop.
Random NSNumber in range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (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