Reference · Number-puzzle engines
boxOffunction
The box a cell is in, numbered row-major from 0.
Import it
import { boxOf } from "@johnmorrisdotca/kazu";
Definition
function boxOf(size: number, index: number): number
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The supported square grid side length. |
index | number | The zero-based row-major cell index. |
Returns
number
The box a cell is in, numbered row-major from 0.
Examples
import { boxOf } from "@johnmorrisdotca/kazu";
console.log(boxOf(6,12));2What it prints (run when this page was built)