| function |
description |
| RandNr :: RandNr(); |
Default constructor of RandNr object, initialize seed by standard time( 0 ) function. |
| void RandNr :: setSeed(); |
Initialize seed (not array) by standard time( 0 ) function. |
| void RandNr :: setSeed( uint addToseed ); |
Add to existing seed new value and set it again. |
| void RandNr :: newArray( uint size ); |
Create space for initializing array, this must be run before setArray method. |
| void RandNr :: setArray(); |
Initialize in array mode, array should contains random numbers (as random as possible), in all cases first element of initializing array is filled similarly as in single seed mode (by time( 0 ) function). |
| uint RandNr :: randInt( uint nr ); |
Output pseudo random number (integer) [ 0, nr ). |
| double RandNr :: randDouble( double nrD ); |
Output pseudo random number (double) [ 0, nrD ]. |
| int RandNr :: randIntFromTo( int from, int to ); |
Output pseudo random number (integer) [ from, to ]. |
| int RandNr :: randDoubleFromTo( double from, double to ); |
Output pseudo random number (double) [ from, to ]. |
| bool RandNr :: probability( double pr ); |
Output true for some percentage of probability, or else is false (pr is double type number, pr >= 1.00 means 100%, pr <= 0 means 0%). |