mirror of
https://github.com/vxunderground/VX-API
synced 2024-06-20 13:58:33 +00:00
12 lines
245 B
C++
12 lines
245 B
C++
ULONG Next = 2; //seed
|
|
|
|
INT PseudoRandomIntegerSubroutine(PULONG Context)
|
|
{
|
|
return ((*Context = *Context * 1103515245 + 12345) % ((ULONG)RAND_MAX + 1));
|
|
}
|
|
|
|
INT CreatePseudoRandomInteger(VOID)
|
|
{
|
|
return (PseudoRandomIntegerSubroutine(&Next));
|
|
}
|