Mersenne Twister random number generator.
Mersenne Twister random number generator. An application would create a static instance of this class, and then use if to generate a sequence of psuedo-random numbers.Usually an application would simply use PRandom::Number() but if performance is an issue then it could also create a static local variable such as: { static PRandom rand; for (i = 0; i < 10000; i++) array[i] = rand; }
This method is not thread safe, so it is the applications responsibility to assure that its calls are single threaded.
PRandom( DWORD seed )
void SetSeed( DWORD seed )
unsigned Generate()
inline operator unsigned()
static unsigned Number()
Alphabetic index HTML hierarchy of classes or Java