Created
February 10, 2017 14:10
-
-
Save Bamieh/cfb1da8ddf9d65d1bc8511b50b587c1a to your computer and use it in GitHub Desktop.
pure function random number generator
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
const randomNumber = (m_w, m_z) => { | |
const c_m_z = 36969 * (m_z & 65535) + (m_z >> 16); | |
const c_m_w = 18000 * (m_w & 65535) + (m_w >> 16); | |
return (c_m_z << 16) + c_m_w; | |
} | |
// code snippet from Joe Nelson's course at frontend masters. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment