Reference · Rules, solvers and generation
inHexfunction
Whether a cell of the square is inside the hexagon: at most R lattice steps from the middle.
Import it
import { inHex } from "@johnmorrisdotca/tsunagi";
Definition
function inHex(size: number, at: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
at | number | The zero-based cell index. |
Returns
boolean
Whether a cell of the square is inside the hexagon: at most R lattice steps from the middle.
Examples
import { inHex } from "@johnmorrisdotca/tsunagi";
console.log(inHex(7,24));trueWhat it prints (run when this page was built)