Skip to content

Instantly share code, notes, and snippets.

@devindazzle
Created February 7, 2014 10:17
Show Gist options
  • Save devindazzle/8860206 to your computer and use it in GitHub Desktop.
Save devindazzle/8860206 to your computer and use it in GitHub Desktop.
- (CGFloat) randomNumberBetween0and1
{
// Generates a random float between 0.0f and 1.0f. Remember to seed using
// srandom(time(0));
return random() / (float)0x7fffffff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment