Reference · Streams, draws and seeds
seededRandomfunction
A seeded stream. The name to reach for; mulberry32 is the same function, for anyone who wants to say which.
Import it
import { seededRandom } from "@johnmorrisdotca/tane";
Definition
function seededRandom(seed: number): Random
Parameters
| Name | Type | Description |
|---|---|---|
seed | number | The numeric seed, read as an unsigned 32-bit integer by the stream. |
Returns
Random
A seeded stream. The name to reach for; mulberry32 is the same function, for anyone who wants to say which.
Examples
import { seededRandom } from "@johnmorrisdotca/tane";
console.log(seededRandom(42)());0.6011037519201636What it prints (run when this page was built)