API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRandom
Seedable pseudo-random number generator using the xoshiro128** algorithm. xoshiro128** (Blackman & Vigna, 2018) keeps a compact 128-bit state - four 32-bit words - and produces high-quality 32-bit outputs that clear the full BigCrush / PractRand test batteries. It replaces the previous Mersenne Twister: ~16 bytes of state instead of ~2.5 KB, faster, and entirely 32-bit (no 64-bit arithmetic), which suits JavaScript well. 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 using the xoshiro128** algorithm.
xoshiro128** (Blackman & Vigna, 2018) keeps a compact 128-bit state - four 32-bit words - and produces high-quality 32-bit outputs that clear the full BigCrush / PractRand test batteries. It replaces the previous Mersenne Twister: ~16 bytes of state instead of ~2.5 KB, faster, and entirely 32-bit (no 64-bit arithmetic), which suits JavaScript well.
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): Randomdestroy(): voidnext(min: number, max: number): numberreset(): thissetSeed(seed: number): thisseed: numbervalue: number