Reference · Rules, solvers and generation
edgeKeyfunction
An edge between two neighbouring cells, the same whichever way round they are named.
Import it
import { edgeKey } from "@johnmorrisdotca/tsunagi";
Definition
function edgeKey(a: number, b: number): string
Parameters
| Name | Type | Description |
|---|---|---|
a | number | The first cell index. |
b | number | The second cell index. |
Returns
string
An edge between two neighbouring cells, the same whichever way round they are named.
Examples
import { edgeKey } from "@johnmorrisdotca/tsunagi";
console.log(edgeKey(1,2));1-2What it prints (run when this page was built)