Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

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

NameTypeDescription
seednumber

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.6011037519201636

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.