summaryrefslogtreecommitdiff
path: root/rand.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-11-10 11:38:32 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2019-11-10 11:39:15 -0500
commit99185ed75bba6c14a996ccf5b6b1b98b823eac0f (patch)
treebfa6d5e3326822e63159b19c34f98d539afb9703 /rand.c
parent421a2e5b9d794050d7bfd34bf0d20440cd7450ee (diff)
wrote value hash table for compile time arguments
Diffstat (limited to 'rand.c')
-rw-r--r--rand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rand.c b/rand.c
new file mode 100644
index 0000000..407f860
--- /dev/null
+++ b/rand.c
@@ -0,0 +1,4 @@
+static U32 rand_u32(U32 seed) {
+ U64 seed64 = (U64)seed;
+ return (U32)((seed64 * 0x832f0fda4e1a8642 + 0x41d49cd5459a2ab4) >> 32);
+}