Function: createRng()
createRng(
seed):Rng
Create a seeded, deterministic Rng. The same seed yields the same sequence everywhere.
Parameters
seed
number
The integer seed. Coerced to a 32-bit integer.
Returns
A fresh, independent Rng.
Example
import { createRng } from "@cosyte/synth";
const rng = createRng(12345);
rng.int(1, 6); // deterministic for seed 12345