#include <c4d_tools.h>
A class to generate random number sequences.
Uniform and Gaussian deviates can be generated.
公共成员函数 |
|
Random () | |
void | Init ( UInt32 s) |
Float | Get01 (void) |
Float | Get11 (void) |
Float | GetG01 (void) |
Float | GetG11 (void) |
Int32 | GetSeed (void) const |
Private Attributes |
|
UInt32 | seed |
Int32 | iset |
Float | gset |
Random | ( | ) |
Default constructor.
void Init | ( | UInt32 | s | ) |
Initializes the random number sequence from a starting seed. Each seed will give a different sequence of random numbers.
[in] | s | The initial seed to start the random number sequence. |
Float Get01 | ( | void | ) |
Gets a random value between 0 and 1 .
Float Get11 | ( | void | ) |
Gets a random value between -1 and +1 .
Float GetG01 | ( | void | ) |
Gets a random value between 0 and 1 with Gaussian distribution.
Float GetG11 | ( | void | ) |
Gets a random value between -1 and +1 with Gaussian distribution.
Int32 GetSeed | ( | void | ) | const |
Gets the seed representing the current state of the random number generator.
|
private |
|
private |
|
private |