halfTurnOnlyfunction
Whether a layer turns only by a half turn: it has a slice that is not square.
Import it
import { halfTurnOnly } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function halfTurnOnly(dims: CuboidDims, axis: CubeAxis): boolean
Parameters
| Name | Type | Description |
|---|---|---|
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
axis | CubeAxis | The model axis: 0 for x, 1 for y, or 2 for z. |
Returns
boolean
Whether a layer turns only by a half turn: it has a slice that is not square.
Examples
import { halfTurnOnly } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
console.log(halfTurnOnly(dims, 1));trueWhat it prints (run when this page was built)