diff options
author | Marvin Borner | 2020-11-13 23:05:00 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-13 23:05:00 +0100 |
commit | efaa0eead75e0b886d41a9ec9db69482fd834295 (patch) | |
tree | e9863e5fcd8d2ee4bb5f5f37d9b5ee9903b3aa75 | |
parent | a1770aac3af3b6b893af9937e0d0712902eeb9e6 (diff) |
Improved random generator
-rw-r--r-- | libc/random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/random.c b/libc/random.c index 086fa11..89fe2be 100644 --- a/libc/random.c +++ b/libc/random.c @@ -13,7 +13,7 @@ void srand(u32 seed) u32 rand() { - g_seed = (214013 * g_seed + 2531011); + g_seed = g_seed * 1103515245 + 12345; return (g_seed >> 16) & 0x7FFF; } |