ReadonlyseedThe resolved seed this generator was created from. Capture it to reproduce a run.
ReadonlynextFloat in [0, 1). The primitive every other method builds on.
ReadonlyfloatFloat in [min, max). Defaults to [0, 1).
ReadonlyintInteger in [min, max] — both ends inclusive.
Readonlybooltrue with probability p (default 0.5).
Readonlysign-1 or 1, each with probability 0.5.
ReadonlypickA uniformly-random element of items. Throws on an empty array.
ReadonlyshuffleA new array with items shuffled (Fisher–Yates). Does not mutate the input.
ReadonlyforkDerive an independent child generator. Advances this generator by four draws to seed the child, so the parent and child streams don't overlap — give each subsystem (loot, terrain, AI) its own fork for stable, order-independent randomness.
ReadonlystateSnapshot the current generator state (JSON-safe).
ReadonlysetRestore a previously snapshotted state.
A seeded random generator. Every method advances the same internal stream, so call order matters — that's the property that makes replay deterministic.