Skip to content

Instantly share code, notes, and snippets.

@jlcampana
Created September 4, 2012 08:35
Show Gist options
  • Save jlcampana/3618562 to your computer and use it in GitHub Desktop.
Save jlcampana/3618562 to your computer and use it in GitHub Desktop.
getRandomIntBetween 2 ints
+(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