Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CFastRand Class Reference

Low randomness, quite-a-lot-faster-than-std::mt19937 random number generator. More...

Public Types

using result_type = u32
 

Public Member Functions

 CFastRand ()
 
 CFastRand (result_type init)
 
result_type operator() ()
 

Static Public Member Functions

static constexpr result_type min ()
 
static constexpr result_type max ()
 
static result_type Rand (result_type &seed)
 
static float RandFloat (result_type &seed, float min, float max)
 

Public Attributes

result_type m_Seed
 

Detailed Description

Low randomness, quite-a-lot-faster-than-std::mt19937 random number generator.

It matches the interface of UniformRandomBitGenerator for use in std::shuffle.

Member Typedef Documentation

◆ result_type

Constructor & Destructor Documentation

◆ CFastRand() [1/2]

CFastRand::CFastRand ( )
inline

◆ CFastRand() [2/2]

CFastRand::CFastRand ( result_type  init)
inline

Member Function Documentation

◆ max()

static constexpr result_type CFastRand::max ( )
inlinestaticconstexpr

◆ min()

static constexpr result_type CFastRand::min ( )
inlinestaticconstexpr

◆ operator()()

result_type CFastRand::operator() ( )
inline

◆ Rand()

static result_type CFastRand::Rand ( result_type seed)
inlinestatic

◆ RandFloat()

static float CFastRand::RandFloat ( result_type seed,
float  min,
float  max 
)
inlinestatic

Member Data Documentation

◆ m_Seed

result_type CFastRand::m_Seed

The documentation for this class was generated from the following file: