Skip to content

Instantly share code, notes, and snippets.

@supereggbert
Last active July 25, 2019 12:44
Show Gist options
  • Save supereggbert/f6cd1d7162594a22d750c481be025999 to your computer and use it in GitHub Desktop.
Save supereggbert/f6cd1d7162594a22d750c481be025999 to your computer and use it in GitHub Desktop.
pseudorandom
var seed=Math.random()
var random3=function(x,y,z){
var f=(Math.abs(x)+1e4)*(Math.abs(y)+2e4)*(Math.abs(z)+3e4);
var a=(f%seed)/seed;
var b=(f%a)/a;
return b;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment