Static Public Member Functions
Random Class Reference

Random values generator. More...

#include <random.h>

List of all members.

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.

Detailed Description

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.

Member Function Documentation

unsigned short Random::nextUShort ( unsigned short  max) [static]

Generates a new random unsigned short.

maxMaximum value for the generated number. This is exclusive, ie. generated value is in range 0 <= x < max

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator