mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-06-19 15:13:30 +00:00
11 lines
192 B
C
11 lines
192 B
C
#include <stdlib.h>
|
|
|
|
static unsigned long int next = 1;
|
|
|
|
int rand(void) {
|
|
next = next * 1103515245 + 12345;
|
|
return (next >> 16) & 0x7FFF;
|
|
}
|
|
|
|
void srand(unsigned int seed) { next = seed; }
|