| FS2_Open
    Open source remastering of the Freespace 2 engine | 
Go to the source code of this file.
| Macros | |
| #define | RND_MASK 0x6000 | 
| #define | RND_MAX 0x7fff | 
| Functions | |
| void | init_semirand () | 
| Initialize Semirand array. Doesn't have to be called.  More... | |
| int | static_rand (int num) | 
| Return a pseudo random 32 bit value given a reasonably small number.  More... | |
| float | static_randf (int num) | 
| Return a random float in 0.0f .. 1.0f- (ie, it will never return 1.0f).  More... | |
| int | static_rand_range (int num, int min, int max) | 
| Return a random integer within a range. Note: min and max are inclusive.  More... | |
| float | static_randf_range (int num, float min, float max) | 
| Return a random float within a range. Note: min and max are inclusive.  More... | |
| void | static_randvec (int num, vec3d *vp) | 
| [To be described]  More... | |
| 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.  More... | |
| void | init_static_rand_alt (int seed) | 
| Seed the alternative random number generator. Doesn't have to be called.  More... | |
| int | static_rand_alt () | 
| Get a random integer between 1 and RND_MAX.  More... | |
| float | static_randf_alt () | 
| Get a random integer between 0 and 1.0.  More... | |
| Variables | |
| int | Semirand_inited = 0 | 
| int | Semirand [SEMIRAND_MAX] | 
| int | Rnd_seed = 1 | 
| #define RND_MASK 0x6000 | 
Definition at line 156 of file staticrand.cpp.
| #define RND_MAX 0x7fff | 
Definition at line 157 of file staticrand.cpp.
| void init_semirand | ( | ) | 
Initialize Semirand array. Doesn't have to be called.
Definition at line 22 of file staticrand.cpp.
Seed the alternative random number generator. Doesn't have to be called.
| seed | Seed input number | 
Definition at line 166 of file staticrand.cpp.
Return a pseudo random 32 bit value given a reasonably small number.
| num | Seed input number | 
Definition at line 38 of file staticrand.cpp.
| int static_rand_alt | ( | ) | 
Get a random integer between 1 and RND_MAX.
Definition at line 176 of file staticrand.cpp.
Randomly perturb a vector around a given (normalized vector) or optional orientation matrix.
| num | |
| out | |
| in | |
| max_angle | |
| orient | 
Definition at line 129 of file staticrand.cpp.
Return a random integer within a range. Note: min and max are inclusive.
| num | Seed input number | 
| min | Minimum range integer to return | 
| max | Maximum range integer to return | 
Definition at line 78 of file staticrand.cpp.
Return a random float in 0.0f .. 1.0f- (ie, it will never return 1.0f).
| num | Seed input number | 
Definition at line 61 of file staticrand.cpp.
| float static_randf_alt | ( | ) | 
Get a random integer between 0 and 1.0.
Definition at line 193 of file staticrand.cpp.
Return a random float within a range. Note: min and max are inclusive.
| num | Seed input number | 
| min | Minimum range float to return | 
| max | Maximum range float to return | 
Definition at line 95 of file staticrand.cpp.
[To be described]
| num | Seed input number | 
| vp | Vector | 
Definition at line 111 of file staticrand.cpp.
| int Rnd_seed = 1 | 
Definition at line 158 of file staticrand.cpp.
| int Semirand[SEMIRAND_MAX] | 
Definition at line 17 of file staticrand.cpp.
| int Semirand_inited = 0 | 
Definition at line 16 of file staticrand.cpp.