Created
August 4, 2013 13:02
-
-
Save willread/6150274 to your computer and use it in GitHub Desktop.
Magical pseudo-random number generator
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
private float seed = 1.0f; | |
float PseudoRandom(){ | |
seed = (seed * 9301 + 49297) % 233280; | |
return seed / 233280; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment