Skip to content

Instantly share code, notes, and snippets.

@doug
Created October 16, 2015 00:38
Show Gist options
  • Save doug/a3c11fc7b363a0e79806 to your computer and use it in GitHub Desktop.
Save doug/a3c11fc7b363a0e79806 to your computer and use it in GitHub Desktop.
Seeded random value
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