MRandomLCG

Engine/source/math/mRandom.h

Linear Congruential Method, the "minimal standard generator".

More...

Protected Static Attributes

Public Functions

randI(S32 i, S32 n)

i..n integer generator

0..2^31 random number generator

Public Static Functions

Detailed Description

Linear Congruential Method, the "minimal standard generator".

Fast, farly good random numbers (better than using rand)

author:

Park & Miller, 1988, Comm of the ACM, 31(10), pp. 1192-1201

Protected Static Attributes

const S32 msQuotient 
const S32 msRemainder 

Public Functions

MRandomLCG()

MRandomLCG(S32 s)

~MRandomLCG()

randI(S32 i, S32 n)

i..n integer generator

randI(void )

Reimplemented from: MRandomGenerator

setSeed(S32 s)

Reimplemented from: MRandomGenerator

Public Static Functions

setGlobalRandSeed(U32 seed)