Blender V2.61 - r43446
Defines | Functions | Variables

MT_random.cpp File Reference

#include "MT_random.h"

Go to the source code of this file.

Defines

#define N   624
#define M   397
#define MATRIX_A   0x9908b0df
#define UPPER_MASK   0x80000000
#define LOWER_MASK   0x7fffffff
#define TEMPERING_MASK_B   0x9d2c5680
#define TEMPERING_MASK_C   0xefc60000
#define TEMPERING_SHIFT_U(y)   (y >> 11)
#define TEMPERING_SHIFT_S(y)   (y << 7)
#define TEMPERING_SHIFT_T(y)   (y << 15)
#define TEMPERING_SHIFT_L(y)   (y >> 18)

Functions

void MT_srand (unsigned int seed)
unsigned int MT_rand ()

Variables

static unsigned int mt [N]
static int mti = N+1

Detailed Description

Definition in file MT_random.cpp.


Define Documentation

#define LOWER_MASK   0x7fffffff

Definition at line 69 of file MT_random.cpp.

Referenced by MT_rand().

#define M   397

Definition at line 66 of file MT_random.cpp.

Referenced by MT_rand().

#define MATRIX_A   0x9908b0df

Definition at line 67 of file MT_random.cpp.

Referenced by MT_rand().

#define N   624

Definition at line 65 of file MT_random.cpp.

Referenced by MT_rand(), and MT_srand().

#define TEMPERING_MASK_B   0x9d2c5680

Definition at line 72 of file MT_random.cpp.

Referenced by MT_rand().

#define TEMPERING_MASK_C   0xefc60000

Definition at line 73 of file MT_random.cpp.

Referenced by MT_rand().

#define TEMPERING_SHIFT_L (   y)    (y >> 18)

Definition at line 77 of file MT_random.cpp.

Referenced by MT_rand().

#define TEMPERING_SHIFT_S (   y)    (y << 7)

Definition at line 75 of file MT_random.cpp.

Referenced by MT_rand().

#define TEMPERING_SHIFT_T (   y)    (y << 15)

Definition at line 76 of file MT_random.cpp.

Referenced by MT_rand().

#define TEMPERING_SHIFT_U (   y)    (y >> 11)

Definition at line 74 of file MT_random.cpp.

Referenced by MT_rand().

#define UPPER_MASK   0x80000000

Definition at line 68 of file MT_random.cpp.

Referenced by MT_rand().


Function Documentation

unsigned int MT_rand ( )
void MT_srand ( unsigned int  seed)

Definition at line 83 of file MT_random.cpp.

References mt, mti, and N.

Referenced by MT_rand().


Variable Documentation

unsigned int mt[N] [static]
int mti = N+1 [static]