Sign in
mojo
/
mojo-tools
/
96b05c1cc252cbd1582be4b8c554e72024938f3c
/
.
/
fusl
/
src
/
prng
/
rand.c
blob: c000cd248cef667bab257940768616c9349f7d70 [
file
] [
log
] [
blame
]
#include
<stdlib.h>
#include
<stdint.h>
static
uint64_t
seed
;
void
srand
(
unsigned
s
)
{
seed
=
s
-
1
;
}
int
rand
(
void
)
{
seed
=
6364136223846793005ULL
*
seed
+
1
;
return
seed
>>
33
;
}