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

inBlockfunction

Whether a seed falls inside a block.

Import it

import { inBlock } from "@johnmorrisdotca/tane";

Definition

function inBlock(seed: number, block: SeedBlock): boolean

Parameters

NameTypeDescription
seednumber

The numeric seed, read as an unsigned 32-bit integer by the stream.

blockSeedBlock

The reserved seed block: its starting seed and length.

Returns

boolean

Whether a seed falls inside a block.

Examples

import { inBlock } from "@johnmorrisdotca/tane";

console.log(inBlock(1005, { from: 1000, size: 100 }));
true

What it prints (run when this page was built)

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