Reference · Surface maze rules and geometry
quatAxisAnglefunction
The turn of angle radians about an axis (any length but nought).
Import it
import { quatAxisAngle } from "@johnmorrisdotca/meikyuu/3d";
Definition
function quatAxisAngle(axis: Vec3, angle: number): Quat
Parameters
| Name | Type | Description |
|---|---|---|
axis | Vec3 | A normalized three-dimensional rotation axis. |
angle | number | The rotation angle in radians. |
Returns
Quat
The turn of angle radians about an axis (any length but nought).
Examples
import { quatAxisAngle } from "@johnmorrisdotca/meikyuu/3d";
console.log(quatAxisAngle([0,1,0],Math.PI/4));[ 0, 0.3826834323650898, 0, 0.9238795325112867 ]What it prints (run when this page was built)