Torque2D Reference
|
#include <mRandom.h>
Public Member Functions | |
RandomLCG () | |
RandomLCG (const S32 seed) | |
void | setSeed (const S32 seed) |
U32 | randI (void) |
![]() | |
void | resetSeed (void) |
S32 | getSeed (void) const |
F32 | randRangeF (const F32 from, const F32 to) |
S32 | randRangeI (const S32 from, const S32 to) |
virtual F32 | randF (void) |
Static Public Member Functions | |
static void | setGlobalRandSeed (const U32 seed) |
Static Protected Attributes | |
static const S32 | msQuotient = S32_MAX / 16807L |
static const S32 | msRemainder = S32_MAX % 16807L |
Additional Inherited Members | |
![]() | |
RandomGeneratorBase () | |
![]() | |
S32 | mSeed |
Linear Congruential Method, the "minimal standard generator"
Fast, fairly good random numbers (better than using rand)
RandomLCG | ( | ) |
RandomLCG | ( | const S32 | seed | ) |
|
virtual |
Implements RandomGeneratorBase.
|
static |
|
virtual |
Implements RandomGeneratorBase.
|
staticprotected |
|
staticprotected |