| 
    FS2_Open
    
   Open source remastering of the Freespace 2 engine 
   | 
 
Go to the source code of this file.
Functions | |
| float | fl_roundoff (float x, int multiple) | 
| Rounds off a floating point number to a multiple of some number.  More... | |
| float | frand () | 
| Return random value in range 0.0..1.0- (1.0- means the closest number less than 1.0)  More... | |
| float | frand_range (float min, float max) | 
| Return a floating point number in the range min..max.  More... | |
| int | rand_chance (float frametime, float chance) | 
| Call this in the frame interval to get TRUE chance times per second.  More... | |
Rounds off a floating point number to a multiple of some number.
| x | Input floating point number | 
| multiple | Multiple to round to | 
Definition at line 21 of file floating.cpp.
| float frand | ( | ) | 
Return random value in range 0.0..1.0- (1.0- means the closest number less than 1.0)
Definition at line 35 of file floating.cpp.
Return a floating point number in the range min..max.
| min | Minimum (inclusive) | 
| max | Maxiumum (inclusive) | 
Definition at line 50 of file floating.cpp.
Call this in the frame interval to get TRUE chance times per second.
If you want it to return TRUE 3 times per second, call it in the frame interval like so: rand_chance(flFrametime, 3.0f);
| frametime | |
| chance | 
Definition at line 66 of file floating.cpp.