Created
October 16, 2015 00:38
-
-
Save doug/a3c11fc7b363a0e79806 to your computer and use it in GitHub Desktop.
Seeded random value
This file contains 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
var seed = 1; | |
function random() { | |
var x = Math.sin(seed++) * 10000; | |
return x - Math.floor(x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment