67 return (a & 0xffff) / 65536.0f;
81 rval = (rval % (max - min + 1)) + min;
82 CLAMP(rval, min, max);
100 rval = rval * (max - min) + min;
156 #define RND_MASK 0x6000
157 #define RND_MAX 0x7fff
void init_semirand()
Initialize Semirand array. Doesn't have to be called.
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.
float vm_vec_normalize_quick(vec3d *src)
void static_rand_cone(int num, vec3d *out, vec3d *in, float max_angle, matrix *orient)
Randomly perturb a vector around a given (normalized vector) or optional orientation matrix...
struct vec3d::@225::@227 xyz
void static_randvec(int num, vec3d *vp)
[To be described]
int Semirand[SEMIRAND_MAX]
#define CLAMP(x, min, max)
matrix * vm_vector_2_matrix(matrix *m, const vec3d *fvec, const vec3d *uvec, const vec3d *rvec)
GLdouble GLdouble GLdouble r
struct matrix::@228::@230 vec
GLboolean GLboolean GLboolean GLboolean a
void vm_rot_point_around_line(vec3d *out, const vec3d *in, float angle, const vec3d *line_point, const vec3d *line_dir)
void init_static_rand_alt(int seed)
Seed the alternative random number generator. Doesn't have to be called.
GLint GLint GLint GLint GLint x
GLboolean GLboolean GLboolean b
int static_rand(int num)
Return a pseudo random 32 bit value given a reasonably small number.
int static_rand_range(int num, int min, int max)
Return a random integer within a range. Note: min and max are inclusive.
float static_randf(int num)
Return a random float in 0.0f .. 1.0f- (ie, it will never return 1.0f).
float static_randf_range(int num, float min, float max)
Return a random float within a range. Note: min and max are inclusive.