a pseudo-random floating-point number in the interval [0, 1) (like Math.random())
a pseudo-random unsigned 32-bit integer in the interval [0, 2^32)
a pseudo-random full 53-bit fraction in the interval [0, 1). (Slower than [[AleaPRNG.random]] but higher precision)
Creates utility functions based on this PRNG, e.g.:
const alea: AleaPRNG = mkAlea();
const nextBool: () => boolean = alea.nextT(n => n < 0.5);
// calling `nextBool()` now returns `true` or `false` at random
a function that, when invoked, transforms the next pseudo-random number n to a T using the provided function f
Generated using TypeDoc
An Alea PRNG