Skip to the content

Chizu地図

Draw SVG maps, frame regions, place numbered callouts and build geography quizzes with English and Japanese names.

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · Framing, geometry and quiz tools

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/chizu";

Definition

function seededRandom(seed: number): Random

Parameters

NameTypeDescription
seednumber

A reproducible numeric seed, read as an unsigned 32-bit integer.

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/chizu";

const a = seededRandom(42);
const b = seededRandom(42);
console.log(a() === b(), a() === b());
// true true
true true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.5.0.