#include <RandomNumber.h>
Public Member Functions | |
| CRandomNumber (void) | |
| Constructor. | |
| CRandomNumber (double dMin, double dMax) | |
| Constructor, initialises to 2 double forming the bounds. | |
| ~CRandomNumber (void) | |
| Destructor. | |
| void | Set (double dMin, double dMax) |
| Sets the random number bound to 2 doubles. | |
| void | SetMax (double dMax) |
| Sets the max. | |
| void | SetMin (double dMin) |
| Sets the min. | |
| double | GetMin (void) const |
| Access to the min. | |
| double | GetMax (void) const |
| Access to the max. | |
| double | Get (void) const |
| Gets a random number based on the settings. | |
| int | GetInt (void) const |
| Gets an integer based on the settings. Sets up temporary new boundaries so that an interval of e.g. 0.8 to 3.7 will become 1.0 to 3.0 allowing integers 1 and 2 only. | |
Static Public Member Functions | |
| static double | GetFraction (void) |
| Returns a random number from 0 to 1 inclusive. | |
| static bool | GetBool (void) |
| Returns true or false;. | |
---------------------------------------------------------------------------
|
|
Constructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Constructor, initialises to 2 double forming the bounds.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Destructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Gets a random number based on the settings.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Returns true or false;.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Returns a random number from 0 to 1 inclusive.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Gets an integer based on the settings. Sets up temporary new boundaries so that an interval of e.g. 0.8 to 3.7 will become 1.0 to 3.0 allowing integers 1 and 2 only. Gets an integer based on the settings. Sets up temporary new boundaries so that an interval of e.g. 0.8 to 3.7 will become 1.0 to 3.0 allowing integers 1 and 2 only. |
|
||||||||||||
|
Sets the random number bound to 2 doubles.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
1.4.4