class Randomizer

A handy class to return random numbers.

Inheritance diagram

Inheritance diagram of Randomizer

__init__(copy: Randomizer) → None
__init__(seed: int) → None

If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.

assign(copy: Randomizer) → Randomizer
Return type


static getNextSeed() → int

Returns a random seed value for the next global Randomizer object.

getSeed() → int

Returns a unique seed value based on the seed value passed to this Randomizer object (and on its current state).

randomInt(range: int) → int

Returns a random integer in the range [0, range).

randomReal(range: float) → float

Returns a random double in the range [0, range).

randomRealUnit() → float

Returns a random double in the range [-0.5, 0.5).