Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

Module rng

Module rng 

Source
Expand description

Deterministic linear-congruential PRNG.

Not cryptographically interesting – perfect for sprinkling variability across particle velocity / enemy-shot cadence / any “looks random but must replay identically” effect. The constants match the venerable glibc LCG, which has good-enough statistical properties for game use and produces the same output on every PS1 / host / emulator.

Structs§

LcgRng
32-bit integer LCG. Step once per next() / signed() call.