|
FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "globalincs/pstypes.h"Go to the source code of this file.
Macros | |
| #define | SEMIRAND_MAX_LOG 4 |
| #define | SEMIRAND_MAX (2 << SEMIRAND_MAX_LOG) |
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... | |
| void | static_randvec (int num, vec3d *vp) |
| [To be described] 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_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. 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 [SEMIRAND_MAX] |
| #define SEMIRAND_MAX (2 << SEMIRAND_MAX_LOG) |
Definition at line 17 of file staticrand.h.
| #define SEMIRAND_MAX_LOG 4 |
Definition at line 16 of file staticrand.h.
| 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 Semirand[SEMIRAND_MAX] |
Definition at line 17 of file staticrand.cpp.