Reference · Rules, solvers and generation
blockRangefunction
A block's first and last level, the last no further than the size has.
Import it
import { blockRange } from "@johnmorrisdotca/tsunagi";
Definition
function blockRange(block: number, count: number): { first: number; last: number; }
Parameters
| Name | Type | Description |
|---|---|---|
block | number | The zero-based block index. |
count | number | The number of portals or levels specified by this signature. |
Returns
{ first: number; last: number; }
A block's first and last level, the last no further than the size has.
Examples
import { blockRange } from "@johnmorrisdotca/tsunagi";
console.log(blockRange(1,192));{ first: 1, last: 16 }What it prints (run when this page was built)