The flutter shutter camera simulator
|
Mersenne Twister pseudo-RNG code. More...
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | MT_N 624 |
#define | MT_M 397 |
#define | MT_MATRIX_A 0x9908b0dfUL |
#define | MT_UPPER_MASK 0x80000000UL |
#define | MT_LOWER_MASK 0x7fffffffUL |
Functions | |
void | mt_init_genrand (unsigned long s) |
initializes the generator with a seed | |
double | mt_genrand_res53 (void) |
generates a random number on [0,1) with 53-bit resolution |
Mersenne Twister pseudo-RNG code.
Original code by Takuji Nishimura and Makoto Matsumoto amended to keep only the parts used.
Definition in file mt19937ar.c.
#define MT_LOWER_MASK 0x7fffffffUL |
least significant r bits
Definition at line 52 of file mt19937ar.c.
#define MT_M 397 |
Definition at line 49 of file mt19937ar.c.
#define MT_MATRIX_A 0x9908b0dfUL |
constant vector a
Definition at line 50 of file mt19937ar.c.
#define MT_N 624 |
Definition at line 48 of file mt19937ar.c.
#define MT_UPPER_MASK 0x80000000UL |
most significant w-r bits
Definition at line 51 of file mt19937ar.c.
double mt_genrand_res53 | ( | void | ) |
generates a random number on [0,1) with 53-bit resolution
Definition at line 144 of file mt19937ar.c.
void mt_init_genrand | ( | unsigned long | s | ) |
initializes the generator with a seed
Definition at line 135 of file mt19937ar.c.