R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
Random Class Reference

Public Member Functions

 Random ()=default
 Construct a new Random object, default constructor.
 
double generate (double min, double max)
 Generate a random double using the std::default_random_engine & uniform_real_distribution. More...
 
float generate (float min, float max)
 Generate a random float using the std::default_random_engine & uniform_real_distribution. More...
 
int generate (int min, int max)
 Generate a random int using the std::default_random_engine & uniform_int_distribution. More...
 
long generate (long min, long max)
 Generate a random long using the std::default_random_engine & uniform_int_distribution. More...
 
short generate (short min, short max)
 Generate a random short using the std::default_random_engine & uniform_int_distribution. More...
 
std::size_t generateSizeT (std::size_t min, std::size_t max)
 Generate a random std::size_t using the std::default_random_engine & uniform_int_distribution. More...
 

Private Attributes

std::random_device _random_device
 

Member Function Documentation

◆ generate() [1/5]

double Random::generate ( double  min,
double  max 
)
inline

Generate a random double using the std::default_random_engine & uniform_real_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random double number

◆ generate() [2/5]

float Random::generate ( float  min,
float  max 
)
inline

Generate a random float using the std::default_random_engine & uniform_real_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random float number

◆ generate() [3/5]

int Random::generate ( int  min,
int  max 
)
inline

Generate a random int using the std::default_random_engine & uniform_int_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random int number

◆ generate() [4/5]

long Random::generate ( long  min,
long  max 
)
inline

Generate a random long using the std::default_random_engine & uniform_int_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random long number

◆ generate() [5/5]

short Random::generate ( short  min,
short  max 
)
inline

Generate a random short using the std::default_random_engine & uniform_int_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random short number

◆ generateSizeT()

std::size_t Random::generateSizeT ( std::size_t  min,
std::size_t  max 
)
inline

Generate a random std::size_t using the std::default_random_engine & uniform_int_distribution.

Parameters
minthe minimum value
maxthe maximum value
Returns
a random std::size_t number

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