Reference · Rules, tiles and records
turnAreafunction
The squares a turned table shows: the grid's area, turned.
Import it
import { turnArea } from "@johnmorrisdotca/kumimoji";
Definition
function turnArea(area: Area, turn: Turn): Area
Parameters
| Name | Type | Description |
|---|---|---|
area | Area | The occupied table bounds. |
turn | Turn | The number of quarter turns of the view. |
Returns
Area
The squares a turned table shows: the grid's area, turned.
Examples
import { turnArea } from "@johnmorrisdotca/kumimoji";
const area = {top:0,left:0,rows:1,cols:3};
console.log(turnArea(area,1));{ top: 0, left: 0, rows: 3, cols: 1 }What it prints (run when this page was built)