Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8742 → Rev 8743

/programs/develop/libraries/kolibri-libc/source/stdlib/rand.c
0,0 → 1,15
#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;
}