API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRandom
Seedable pseudo-random number generator based on the Mersenne Twister (MT19937) algorithm. Produces 32-bit unsigned integers with period 2^19937−1, normalised to the `[min, max)` range requested by each next call. The generator is deterministic: calling `setSeed(s)` followed by the same sequence of `next()` calls always produces the same output. Use `reset()` to replay from the current seed without changing it.
import { Random } from '@codexo/exojs' Seedable pseudo-random number generator based on the Mersenne Twister (MT19937) algorithm. Produces 32-bit unsigned integers with period 2^19937−1, normalised to the `[min, max)` range requested by each next call.
The generator is deterministic: calling `setSeed(s)` followed by the same sequence of `next()` calls always produces the same output. Use `reset()` to replay from the current seed without changing it.
new(seed: number): Random destroy(): void next(min: number, max: number): number reset(): this setSeed(seed: number): this iteration: number seed: number value: number