home · contact · privacy
Improved (and simplified) pseudo-randomness.
[plomrogue] / src / rrand.c
diff --git a/src/rrand.c b/src/rrand.c
deleted file mode 100644 (file)
index e2b459b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "rrand.h"
-#include <stdint.h> /* for uint16_t, uint32_t */
-
-
-
-static uint32_t seed = 0;
-
-
-
-extern uint16_t rrand()
-{
-    /* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */
-    seed = ((seed * 1103515245) + 12345) % 2147483647;
-
-    return (seed >> 16);     /* Ignore less random least significant 16 bits. */
-}
-
-
-
-extern void rrand_seed(uint32_t new_seed)
-{
-    seed = new_seed;
-}