Random values generator. More...
#include <random.h>
Static Public Member Functions | |
| static void | init (int seed) | 
| Inits or re-inits the Random class with specified seed.  | |
| static unsigned short | nextUShort (unsigned short max) | 
| Generates a new random unsigned short.   | |
Random values generator.
Each call to a method that generates a value performs a bIsInit == true check first. If this check fails a builtInInit() is called. This ensures that Random number generator is always initialized before the rand() call is made.
Internally this uses srand() and rand() functions from C Standard Library.
| unsigned short Random::nextUShort | ( | unsigned short | max | ) |  [static] | 
        
Generates a new random unsigned short.
| max | Maximum value for the generated number. This is exclusive, ie. generated value is in range 0 <= x < max |