CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
lcg.h
Go to the documentation of this file.
1
7
8#include <cx/cx.h>
9
43
48#define LCG_MAX (0x7ffffffe)
49
68_meta_inline int32 lcgRandom(_Inout_ uint32* state)
69{
70 return ((*state = *state * 1103515245 + 12345) % ((uint32)LCG_MAX + 1));
71}
72
int32 lcgRandom(uint32 *state)
Definition lcg.h:68
#define LCG_MAX
Definition lcg.h:48