Sign in
fuchsia
/
zircon
/
13ee3dc5e4c46bf127977ad28645c47442ec517d
/
.
/
third_party
/
ulib
/
musl
/
src
/
prng
/
rand.c
blob: 0eaa2760724a566f7db7d1fa0273efe86339b512 [
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
;
}