Reference · Rules, solvers and generation
Randomtype
A number in [0, 1), like Math.random, from a stream a seed fixes.
Import it
import type { Random } from "@johnmorrisdotca/tsunagi";
Definition
type Random = () => number;
Examples
import type { Random } from "@johnmorrisdotca/tsunagi";
import { seededRandom } from "@johnmorrisdotca/tsunagi";
const value: Random = seededRandom(42);
console.log(value);[Function (anonymous)]What it prints (run when this page was built)