Skip to the content

Kazu数

Generate checked Sudoku and logic puzzles, read native rules and hints, and draw or embed playable boards.

Kazu is the Japanese word 数 for number. About the name

Contents

Reference · Number-puzzle engines

seededRandomfunction

A stream of numbers in [0, 1) fixed by a seed. The seed is read as an unsigned 32-bit integer.

Import it

import { seededRandom } from "@johnmorrisdotca/kazu";

Definition

function seededRandom(seed: number): Random

Parameters

NameTypeDescription
seednumber

A reproducible integer seed from 1 to KAZU_SEED_MOST.

Returns

Random

A stream of numbers in [0, 1) fixed by a seed. The seed is read as an unsigned 32-bit integer.

Examples

import { seededRandom } from "@johnmorrisdotca/kazu";

console.log(seededRandom(42)());
0.6011037519201636

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kazu 2.1.0.