NearestInSkytype
One answer of a query by angle: the thing and its angle from the target, in degrees.
Import it
import type { NearestInSky } from "@johnmorrisdotca/hoshi-stars/nearest";
Definition
interface NearestInSky<T extends NearestThing = Star> {
thing: T;
angle: number;
}
Members
| Name | Type | Description |
|---|---|---|
thing | T | The star or deep-sky object. |
angle | number | The angle on the sky from the target, in degrees, 0 to 180. |
Examples
import { nearest, type NearestInSky } from "@johnmorrisdotca/hoshi-stars/nearest";
const first: NearestInSky = nearest("Mizar", { count: 1 })[0]!;
console.log(first.thing.name, first.angle.toFixed(2));undefined 0.00What it prints (run when this page was built)