RNG

Fields

const unsigned int

Max32

Functions

SET_CID

void

Init

unsigned int

Rand32

double

RandD

Detailed Description

class RNG : public RED::Object

Abstract class providing an interface to random number generators.

@related class RED::Random, class RED::FastRandom

REDsdk makes an extensive use of random numbers. As a consequence REDsdk provides several random number generators for dedicated usages. Each generator inherits this class.

Subclassed by RED::FastRandom, RED::Random

Public Functions

SET_CID (CID_class_REDRNG) IMPLEMENT_AS()
virtual void Init(unsigned int iSeed) = 0

Initializes a 32bit pseudo-random numbers generator.

Parameters

iSeed – seed used for initialization.

virtual unsigned int Rand32() = 0
Returns

a 32bit pseudo-random number in the range [0, RED::Random::Max32-1].

double RandD()
Returns

A pseudo-random number in the rang [ 0.0, 1.0 ].

Public Static Attributes

static const unsigned int Max32

Maximum value returned by Rand32 + 1.