![]() |
Default implementation of the Rand class for integral data types.This default implementation of the Rand class creates random, integral numbers in the range , where max is the maximal value of the given data type T.
More...
#include <Random.h>
Public Member Functions | |
Constructors | |
Rand () | |
Default constructor of the default implementation of the Rand class. More... | |
Rand (T min, T max) | |
Range constructor of the default implementation of the Rand class. More... | |
Conversion operators | |
operator T () const | |
Conversion to the created random number. More... | |
Private Attributes | |
Member variables | |
T | value_ |
The random number. | |
Default implementation of the Rand class for integral data types.
This default implementation of the Rand class creates random, integral numbers in the range , where max is the maximal value of the given data type T.
|
inlineexplicit |
|
inlineexplicit |
Range constructor of the default implementation of the Rand class.
min | The smallest possible random value. |
max | The largest possible random value. |
This constructor creates a random number in the range , where min must be smaller or equal to max. This requirement is only checked in debug mode. In release mode, no check is performed to enforce the validity of the values. Therefore the returned value is undefined if min is larger than max.
|
inline |
Conversion to the created random number.