Skip to content

Instantly share code, notes, and snippets.

@newswim
Created April 2, 2016 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newswim/1e876131529c1f2ec82138cbd3da9d12 to your computer and use it in GitHub Desktop.
Save newswim/1e876131529c1f2ec82138cbd3da9d12 to your computer and use it in GitHub Desktop.
random number generator
function random(m_w, m_z){
m_z = 36969 * (m_z & 65535) + (m_z >> 16);
m_w = 18000 * (m_w & 65535) + (m_w >> 16);
return (m_z << 16) + m_w
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment