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
10
CX_C_BEGIN
11
45
50
#define LCG_MAX (0x7ffffffe)
51
70
_meta_inline int32
lcgRandom
(_Inout_ uint32* state)
71
{
72
return
((*state = *state * 1103515245 + 12345) % ((uint32)
LCG_MAX
+ 1));
73
}
74
76
77
CX_C_END
lcgRandom
int32 lcgRandom(uint32 *state)
Definition
lcg.h:70
LCG_MAX
#define LCG_MAX
Definition
lcg.h:50
cx
math
lcg.h
Generated by
1.9.8