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
lcgRandom
int32 lcgRandom(uint32 *state)
Definition
lcg.h:68
LCG_MAX
#define LCG_MAX
Definition
lcg.h:48
cx
math
lcg.h
Generated by
1.9.8