Reference · Pipes, rules and solving
turnfunction
A piece turned quarters quarter turns clockwise; a negative number turns it the other way.
Import it
import { turn } from "@johnmorrisdotca/suido";
Definition
function turn(mask: number, quarters?: number): number
Parameters
| Name | Type | Description |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
quarters (optional) | number | Clockwise quarter turns, per cell or for the piece specified by the signature. |
Returns
number
A piece turned quarters quarter turns clockwise; a negative number turns it the other way.
Examples
import { turn } from "@johnmorrisdotca/suido";
console.log(turn(3,1));6What it prints (run when this page was built)