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
| Name | Type | Description |
|---|---|---|
seed | number | The numeric seed, read as an unsigned 32-bit integer by the stream. |
block | SeedBlock | 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 }));trueWhat it prints (run when this page was built)