mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2025-01-01 06:23:37 +01:00
15 lines
211 B
C
15 lines
211 B
C
|
#include <stdlib.h>
|
||
|
#include "tinymt32.h"
|
||
|
|
||
|
static tinymt32_t random;
|
||
|
|
||
|
void srand(unsigned int seed)
|
||
|
{
|
||
|
tinymt32_init(&random, seed);
|
||
|
}
|
||
|
|
||
|
int rand(void)
|
||
|
{
|
||
|
return tinymt32_generate_uint32(&random) & 0x7fffffff;
|
||
|
}
|