Skip to content

fromMathRandom

fromMathRandom(fn): Engine

Defined in: src/compat.ts:49

Adopt any () => number in [0, 1) as a ransu engine.

() => number

Engine

const source = fromMathRandom(Math.random);
new Random(source).integer(1, 6); // 4