Reference · Tile and table elements
rackWidthfunction
How wide a rack is, in tile widths: the last tile's place and the tile itself.
Import it
import { rackWidth } from "@johnmorrisdotca/jarajara/element";
Definition
function rackWidth(places: readonly RackPlace[]): number
Parameters
| Name | Type | Description |
|---|---|---|
places | readonly RackPlace[] | The native rack positions. |
Returns
number
How wide a rack is, in tile widths: the last tile's place and the tile itself.
Examples
import { rackPlaces, rackWidth } from "@johnmorrisdotca/jarajara/element";
console.log(rackWidth(rackPlaces(3)));3.04What it prints (run when this page was built)