Skip to content

Instantly share code, notes, and snippets.

@Grissess
Created March 20, 2017 23:59
Show Gist options
  • Save Grissess/fb70b0437ecac668d38e1458cf9e75c2 to your computer and use it in GitHub Desktop.
Save Grissess/fb70b0437ecac668d38e1458cf9e75c2 to your computer and use it in GitHub Desktop.
Amidoingrandrite?
func rand(n=0)
n = ((n * 17) + 1569752) % 3707765549
n = (n << 1) | (((n >> 3) & 1) ^ ((n >> 6) & 1))
n = (n << 1) | (((n >> 8) & 1) ^ ((n >> 5) & 1))
n = ((n * 7) + 67293512) % 3747882443
n = (n << 1) | (((n >> 7) & 1) ^ ((n >> 2) & 1))
n = (n << 1) | (((n >> 4) & 1) ^ ((n >> 3) & 1))
return n
end
func seed(n)
rand.closure.n = n
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment