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.  More... | |
| static unsigned short | nextUShort (unsigned short max) | 
| Generates a new random unsigned short.  More... | |
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.
      
  | 
  static | 
Inits or re-inits the Random class with specified seed.
Definition at line 42 of file random.cpp.
      
  | 
  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 | 
Definition at line 48 of file random.cpp.