Created
September 4, 2012 08:35
-
-
Save jlcampana/3618562 to your computer and use it in GitHub Desktop.
getRandomIntBetween 2 ints
This file contains hidden or 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
+(NSInteger)getRandomIntBetween:(NSInteger)min andMax:(NSInteger)max | |
{ | |
return min + arc4random() % ((max + 1) - min); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment