Back to Top page.

EGRandom Class Reference

Class for random number generator. More...

#include <EGRandom.h>

List of all members.

Static Public Methods

unsigned long NextInt ()
 Returns a random unsigned long value in the interval [0, 0xffffffff].

int NextInt (int from, int to)
 Returns a random integer value in the interval [from, to].

double NextReal ()
 Returns a random double value in the interval [0,1).

void SetSeed (unsigned)
 Initializes a seed.

void SaveSeed (const char *)
 Saves random seeds.

void LoadSeed (const char *)
 Loads random seeds.


Detailed Description

Class for random number generator.


Member Function Documentation

void EGRandom::LoadSeed const char *    filename [static]
 

Loads random seeds.

Parameters:
filename  [in] File name

int EGRandom::NextInt int    from,
int    to
[static]
 

Returns a random integer value in the interval [from, to].

Parameters:
from  [in] Lowest value
to  [in] Highest value
Returns:
Random integer value in the interval [from, to].

unsigned long EGRandom::NextInt   [static]
 

Returns a random unsigned long value in the interval [0, 0xffffffff].

Returns:
Random number in the interval [0, 0xffffffff].

double EGRandom::NextReal   [static]
 

Returns a random double value in the interval [0,1).

Returns:
Random double value in the interval [0,1).

void EGRandom::SaveSeed const char *    filename [static]
 

Saves random seeds.

Parameters:
filename  [in] File name

void EGRandom::SetSeed unsigned    seed [static]
 

Initializes a seed.

Parameters:
seed  [in] Seed


The documentation for this class was generated from the following files: