Sign in
fuchsia
/
fuchsia
/
refs/heads/releases/canary
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
prng
/
rand.c
blob: 04fdf25e41161b10284624a39e705ebd219aae22 [
file
] [
log
] [
blame
]
#include
<stdint.h>
#include
<stdlib.h>
static
uint64_t
seed
;
void
srand
(
unsigned
s
)
{
seed
=
s
-
1
;
}
int
rand
(
void
)
{
seed
=
6364136223846793005ULL
*
seed
+
1
;
return
seed
>>
33
;
}