Cyclone | Cyclone: cyclone::Random Class Reference |
#include <random.h>
Public Member Functions | |
Random () | |
Creates a new random number stream with a seed based on timing data. | |
Random (unsigned seed) | |
Creates a new random stream with the given seed. | |
void | seed (unsigned seed) |
Sets the seed value for the random stream. | |
unsigned | randomBits () |
Returns the next random bitstring from the stream. | |
real | randomReal () |
Returns a random floating point number between 0 and 1. | |
real | randomReal (real scale) |
Returns a random floating point number between 0 and scale. | |
real | randomReal (real min, real max) |
Returns a random floating point number between min and max. | |
unsigned | randomInt (unsigned max) |
Returns a random integer less than the given value. | |
real | randomBinomial (real scale) |
Returns a random binomially distributed number between -scale and +scale. | |
Vector3 | randomVector (real scale) |
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f]. | |
Vector3 | randomVector (const Vector3 &scale) |
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f], where scale is the corresponding component of the given vector. | |
Vector3 | randomVector (const Vector3 &min, const Vector3 &max) |
Returns a random vector in the cube defined by the given minimum and maximum vectors. | |
Vector3 | randomXZVector (real scale) |
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f], except the y coordinate which is zero. | |
Quaternion | randomQuaternion () |
Returns a random orientation (i.e. |
a seed and its output. This is used to get random numbers. Rather than a funcion, this allows there to be several streams of repeatable random numbers at the same time. Uses the RandRotB algorithm.
|
Creates a new random number stream with a seed based on timing data.
|
|
Creates a new random stream with the given seed.
|
|
Returns a random binomially distributed number between -scale and +scale.
|
|
Returns the next random bitstring from the stream. This is the fastest method. |
|
Returns a random integer less than the given value.
|
|
Returns a random orientation (i.e. normalized) quaternion. |
|
Returns a random floating point number between min and max.
|
|
Returns a random floating point number between 0 and scale.
|
|
Returns a random floating point number between 0 and 1.
|
|
Returns a random vector in the cube defined by the given minimum and maximum vectors. The probability is uniformly distributed in this region. |
|
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f], where scale is the corresponding component of the given vector.
|
|
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f].
|
|
Returns a random vector where each component is binomially distributed in the range (-scale to scale) [mean = 0.0f], except the y coordinate which is zero.
|
|
Sets the seed value for the random stream.
|
© 2000-2003 Icosagon. All Rights Reserved.
Distributed under licence.
Cyclone Version 2.0.5 (Documentation generated Fri Nov 10 20:44:29 2006). |