#include <cel_random.h>
List of all members.
Detailed Description
Pseudo random number generator based on Mersenne Twister Random Number Generator algorithm.
Constructor & Destructor Documentation
| Celartem::Random::Random |
( |
|
) |
|
| Celartem::Random::Random |
( |
u32 |
inSeed |
) |
|
Initializes the random number generator using the specified seed.
This method internally calls sgenrand method.
- Parameters:
-
| Celartem::Random::Random |
( |
const Random & |
inRandom |
) |
|
Duplicates the existing Random instance.
The original and the duplicated instance generates same random numbers until sgenrand method is called.
- Parameters:
-
| inRandom | A Random instance to duplicate. |
Member Function Documentation
| u32 Celartem::Random::forward |
( |
|
) |
|
Forward the state of the random number generator.
- Returns:
- Reserved for internal use. Usually it should be ignored.
| double Celartem::Random::genrand |
( |
|
) |
|
Generates a fraction number in [0 1).
- Returns:
- A fraction number in [0 1); a number which is no less than 0 but smaller than 1.0.
| size_t Celartem::Random::genrand_n |
( |
size_t |
n |
) |
|
Generates an integral number in [0 n).
- Parameters:
-
- Returns:
- An integral number in [0 n); a number which is no less than 0 but smaller than n.
| void Celartem::Random::sgenrand |
( |
u32 |
seed |
) |
|
Initializes the random number generator using the specified seed.
- Parameters:
-
The documentation for this class was generated from the following file: