Reference · Rockets, variants, parts and the fit check
Readingtype
One reading of a device's orientation: front to back (beta, -180 to 180 degrees) and left to right (gamma, -90 to 90 degrees). Either is null when the device gives none.
Import it
import type { Reading } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface Reading {
beta: number | null;
gamma: number | null;
}
Members
| Name | Type | Description |
|---|---|---|
beta | number | null | Front to back, -180 to 180 degrees. |
gamma | number | null | Left to right, -90 to 90 degrees. |
Examples
import type { Reading } from "@johnmorrisdotca/uchusen-rockets";
const reading: Reading = { beta: 20, gamma: -5 };
console.log(reading);{ beta: 20, gamma: -5 }What it prints (run when this page was built)