Reference · Streams, draws and seeds
Randomtype
A number in [0, 1), like Math.random, from a stream a seed fixes.
Import it
import type { Random } from "@johnmorrisdotca/tane";
Definition
type Random = () => number;
Examples
import type { Random } from "@johnmorrisdotca/tane";
import { mulberry32 } from "@johnmorrisdotca/tane";
const value: Random = mulberry32(42);
console.log(value());0.6011037519201636What it prints (run when this page was built)