Skip to content

Instantly share code, notes, and snippets.

@Bamieh
Created Feb 10, 2017
Embed
What would you like to do?
pure function random number generator
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