Created
July 11, 2019 17:26
-
-
Save gastonambrogi/f5654dd110bfe7a5b040f2d81f4e48f1 to your computer and use it in GitHub Desktop.
Function that generates a random by a seed
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
function random(seed) { | |
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