Reference · Rules, solvers and generation
hexRadiusfunction
The hexagon's radius on a board of this side: R, for a side of 2R + 1.
Import it
import { hexRadius } from "@johnmorrisdotca/tsunagi";
Definition
function hexRadius(size: number): number
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
Returns
number
The hexagon's radius on a board of this side: R, for a side of 2R + 1.
Examples
import { hexRadius } from "@johnmorrisdotca/tsunagi";
console.log(hexRadius(7));3What it prints (run when this page was built)