12 ( ( ( L ) > ( H ) ) ? RNG_BASE( ( H ), ( L ) ) \
13 : RNG_BASE( ( L ), ( H ) ) )
19#define RNG_BASE( L, H ) \
20 ( (int)L + (int)( (double)( H - L + 1 ) * randfp() ) )
24#define RNGF() ( randfp() )
31 NormalInverse( 0.158655255 + RNGF() * ( 1. - 0.158655255 * 2. ) )
38 NormalInverse( 0.022750132 + RNGF() * ( 1. - 0.022750132 * 2. ) )
45 NormalInverse( 0.0013498985 + RNGF() * ( 1. - 0.0013498985 * 2. ) )
double Normal(double x)
Calculates the Normal distribution.
double randfp(void)
Gets a random float between 0 and 1 (inclusive).
double NormalInverse(double p)
Calculates the inverse of the normal.
void rng_init(void)
Initializes the random subsystem.
unsigned int randint(void)
Gets a random integer.