Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Random Class Reference
[Core]

List of all members.


Public Member Functions

 Random ()
void Seed (unsigned int seed)
void Seed (unsigned int seeds[], int count)
unsigned int RandomInteger ()
float RandomFloat ()
int RandomRanged (int min, int max)

Detailed Description

Author:
Mattias Gustavsson
Random number generator (Marsienne Twister)

Definition at line 14 of file Random.h.


Constructor & Destructor Documentation

Random::Random (  ) 

Definition at line 52 of file Random.cpp.


Member Function Documentation

void Random::Seed ( unsigned int  seed  ) 

Initializes mt_[N] with a seed

Definition at line 60 of file Random.cpp.

void Random::Seed ( unsigned int  seeds[],
int  count 
)

initialize by an array with array-length seeds is the array for initializing keys count is its length slight change for C++, 2004/2/26

Definition at line 79 of file Random.cpp.

unsigned int Random::RandomInteger (  ) 

Generates a random number on [0,0xffffffff]-interval

Definition at line 118 of file Random.cpp.

float Random::RandomFloat (  ) 

Generates a random number on [0,1]-real-interval

Definition at line 184 of file Random.cpp.

int Random::RandomRanged ( int  min,
int  max 
)

Definition at line 170 of file Random.cpp.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.