cuboidPastCommitfunction
Whether a held layer is past its point of no return: letting go now, at rest, makes a move.
Import it
import { cuboidPastCommit } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function cuboidPastCommit(angle: number, halfOnly: boolean, commitAngle?: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
angle | number | The signed drag angle in degrees. |
halfOnly | boolean | Whether the layer can only make a half turn. |
commitAngle (optional) | number | The drag angle in degrees at which a resting release commits a turn. |
Returns
boolean
Whether a held layer is past its point of no return: letting go now, at rest, makes a move.
Examples
import { cuboidPastCommit } from "@johnmorrisdotca/kyuubu/cuboid";
console.log(cuboidPastCommit(100, true));trueWhat it prints (run when this page was built)