from panda3d.core import Randomizer
class Randomizer


A handy class to return random numbers.

Inheritance diagram

Inheritance diagram of Randomizer

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

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

assign(copy: Randomizer) Randomizer
static get_next_seed() int

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

get_seed() int

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

random_int(range: int) int

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

random_real(range: float) float

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

random_real_unit() float

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