RTP Audio System
2.0.0
|
#include <randomizer.h>
Public Member Functions | |
Randomizer () | |
void | setSeed () |
void | setSeed (const cardinal seed) |
card8 | random8 () |
card16 | random16 () |
card32 | random32 () |
card64 | random64 () |
double | random () |
cardinal | random (const cardinal a, const cardinal b) |
double | random (const double a, const double b) |
Private Attributes | |
card32 | Value |
This class is an randomizer. The randomizer algorithm will calculate random numbers with seed given by system timer (microseconds since January 01, 1970) or given by a number.
Constructor. Seed will be initialized by system timer (microseconds since January 01, 1970).
double Randomizer::random | ( | ) | [inline] |
Get double random number out of interval [0,1].
cardinal Randomizer::random | ( | const cardinal | a, |
const cardinal | b | ||
) |
Get double random cardinal number out of interval [a,b].
double Randomizer::random | ( | const double | a, |
const double | b | ||
) |
Get double random double number out of interval [a,b].
card16 Randomizer::random16 | ( | ) | [inline] |
Get 16-bit random number.
card32 Randomizer::random32 | ( | ) | [inline] |
Get 32-bit random number.
card64 Randomizer::random64 | ( | ) | [inline] |
Get 64-bit random number.
card8 Randomizer::random8 | ( | ) | [inline] |
Get 8-bit random number.
void Randomizer::setSeed | ( | ) |
Set seed by system timer (microseconds since January 01, 1970).
void Randomizer::setSeed | ( | const cardinal | seed | ) |
Set seed by given number.
seed | Seed value. |
card32 Randomizer::Value [private] |