fromMathRandom
fromMathRandom(
fn):Engine
Defined in: src/compat.ts:49
Adopt any () => number in [0, 1) as a ransu engine.
Parameters
Section titled “Parameters”() => number
Returns
Section titled “Returns”Example
Section titled “Example”const source = fromMathRandom(Math.random);new Random(source).integer(1, 6); // 4