Reference · Rockets, variants, parts and the fit check
turnedByfunction
What the family's view controls choose: the turn and tip, in degrees, from a base angle. Dragging right makes yaw larger, which carries the camera the other way round; tilt larger tips the top away, which lowers the camera.
Import it
import { turnedBy } from "@johnmorrisdotca/uchusen-rockets";
Definition
function turnedBy(base: Angle, yaw: number, tilt: number): Angle
Parameters
| Name | Type | Description |
|---|---|---|
base | Angle | The angle to turn from. |
yaw | number | Degrees turned round. |
tilt | number | Degrees tipped up or down. |
Returns
Angle
The new angle.
Examples
import { turnedBy, VIEWS } from "@johnmorrisdotca/uchusen-rockets";
console.log(turnedBy(VIEWS.front, 30, 10));{ az: -30, el: -7 }What it prints (run when this page was built)