Skip to content

Instantly share code, notes, and snippets.

@HeidiHansen
Created September 8, 2014 03:10
Show Gist options
  • Save HeidiHansen/037ce14b24cb255d5c3e to your computer and use it in GitHub Desktop.
Save HeidiHansen/037ce14b24cb255d5c3e to your computer and use it in GitHub Desktop.
Arc4Random Function
#define ARC4RANDOM_MAX 0x100000000
- (CGFloat)randomFloatBetweenNumber:(CGFloat)minRange
andNumber:(CGFloat)maxRange
{
return ((float)arc4random() / ARC4RANDOM_MAX) * (maxRange - minRange) + minRange;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment