Seedable pseudo-random number generator using xorshift128.
Produces reproducible sequences from identical seeds. Period: 2^128 - 1
// Same seed = same sequenceconst rng1 = new SeededRNG('test-seed');const rng2 = new SeededRNG('test-seed');rng1.nextInt(1, 6) === rng2.nextInt(1, 6); // true Copy
// Same seed = same sequenceconst rng1 = new SeededRNG('test-seed');const rng2 = new SeededRNG('test-seed');rng1.nextInt(1, 6) === rng2.nextInt(1, 6); // true
Optional
Returns a random floating-point number in the range [0, 1).
Returns a random integer in the inclusive range [min, max].
Minimum value (inclusive)
Maximum value (inclusive)
Seedable pseudo-random number generator using xorshift128.
Produces reproducible sequences from identical seeds. Period: 2^128 - 1
Example