CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Macros | Functions | Variables
random.c File Reference
#include <lauxlib.h>
#include <lua.h>
#include <stddef.h>
#include <stdint.h>

Macros

#define N   624
 
#define M   397
 
#define MATRIX_A   0x9908b0dfUL /* constant vector a */
 
#define UPPER_MASK   0x80000000UL /* most significant w-r bits */
 
#define LOWER_MASK   0x7fffffffUL /* least significant r bits */
 

Functions

int luaopen_random (lua_State *L)
 

Variables

uint32_t mt [N]
 
uint16_t mti = N + 1
 

Macro Definition Documentation

◆ LOWER_MASK

#define LOWER_MASK   0x7fffffffUL /* least significant r bits */

◆ M

#define M   397

◆ MATRIX_A

#define MATRIX_A   0x9908b0dfUL /* constant vector a */

◆ N

#define N   624

◆ UPPER_MASK

#define UPPER_MASK   0x80000000UL /* most significant w-r bits */

Function Documentation

◆ luaopen_random()

int luaopen_random ( lua_State L)

Variable Documentation

◆ mt

uint32_t mt[N]

◆ mti

uint16_t mti = N + 1