Go to the documentation of this file.
8 #ifndef NUKLEI_RANDOM_H
9 #define NUKLEI_RANDOM_H
31 static void seed(
unsigned s);
47 static double uniform(
double a,
double b);
55 static unsigned long int uniformInt(
unsigned long int n);
73 static double gaussian(
double sigma);
78 static double beta(
double a,
double b);
102 static void printRandomState();
109 static bool initialized_;
static double beta(double a, double b)
This function returns a random variate from the beta distribution.
static double triangle(double b)
This function returns a random variate from the triangle distribution of zero mean and base b.
static Vector2 uniformDirection2d()
This function returns a random direction vector in two dimensions.
static unsigned long int uniformInt(unsigned long int n)
This function returns a random integer from 0 to n-1 inclusive.
static void seed(unsigned s)
Seeds the random generators with s.
static Quaternion uniformQuaternion()
This function returns rotation uniformly distributed on .
static bool init()
Used internally.
static double uniform()
This function returns a double precision floating point number uniformly distributed in the range .
static Vector3 uniformDirection3d()
This function returns a random direction vector in three dimensions.
static double gaussian(double sigma)
This function returns a Gaussian random variate, with mean zero and standard deviation sigma.
Implements random variate generators for various distributions.