#include <UtilMath.hpp>
Public Member Functions | |
UtilMath () | |
Default Constructor. | |
virtual | ~UtilMath () |
Destructor. | |
Static Public Member Functions | |
static int | intDivRoundUp (int Div1, int Div2) |
integer divide and round up | |
static float | random () |
get a random float | |
static float | randomFloat (float MinVal, float MaxVal) |
get a random float | |
static int | randomInt (int MinVal, int MaxVal) |
get a random int | |
static void | randomize () |
randomize via the clock |
This class provides static time routines for sleeping and finding the current time
It also can be instantiated to provide a time duration watcher
Definition at line 54 of file UtilMath.hpp.
int UtilMath::intDivRoundUp | ( | int | Div1, | |
int | Div2 | |||
) | [static] |
float UtilMath::random | ( | ) | [static] |
get a random float
get a random floating point number
Definition at line 72 of file UtilMath.cpp.
Referenced by randomFloat(), and randomInt().
float UtilMath::randomFloat | ( | float | MinVal, | |
float | MaxVal | |||
) | [static] |
get a random float
get a random floating point number with min and max
Definition at line 88 of file UtilMath.cpp.
References random().
int UtilMath::randomInt | ( | int | MinVal, | |
int | MaxVal | |||
) | [static] |
get a random int
get a random integer with min and max
Definition at line 100 of file UtilMath.cpp.
References random().
void UtilMath::randomize | ( | ) | [static] |
randomize via the clock
randomize
Definition at line 80 of file UtilMath.cpp.