12 #ifndef _STATIC_RAND_H
16 #define SEMIRAND_MAX_LOG 4
17 #define SEMIRAND_MAX (2 << SEMIRAND_MAX_LOG) // Do not change this! Change SEMIRAND_MAX_LOG!
int Semirand[SEMIRAND_MAX]
void static_randvec(int num, vec3d *vp)
[To be described]
void static_rand_cone(int num, vec3d *out, vec3d *in, float max_angle, matrix *orient=NULL)
Randomly perturb a vector around a given (normalized vector) or optional orientation matrix...
int static_rand(int num)
Return a pseudo random 32 bit value given a reasonably small number.
float static_randf(int num)
Return a random float in 0.0f .. 1.0f- (ie, it will never return 1.0f).
void init_semirand()
Initialize Semirand array. Doesn't have to be called.
void init_static_rand_alt(int seed)
Seed the alternative random number generator. Doesn't have to be called.
float static_randf_range(int num, float min, float max)
Return a random float within a range. Note: min and max are inclusive.
int static_rand_alt()
Get a random integer between 1 and RND_MAX.
float static_randf_alt()
Get a random integer between 0 and 1.0.
int static_rand_range(int num, int min, int max)
Return a random integer within a range. Note: min and max are inclusive.