nearbyInputfunction
A nearby star (/nearby) as a thing with a distance. A star whose parallax is 0 or less has no distance.
Import it
import { nearbyInput } from "@johnmorrisdotca/hoshi-stars/distance";
Definition
function nearbyInput(star: Pick<NearbyStar, "id" | "name" | "rightAscension" | "declination" | "magnitude" | "parallaxMas" | "parallaxErrorMas">): DistanceInput
Parameters
| Name | Type | Description |
|---|---|---|
star | Pick<NearbyStar, "magnitude" | "name" | "rightAscension" | "declination" | "parallaxMas" | "parallaxErrorMas" | "id"> | A star from |
Returns
DistanceInput
The input for layersByDistance.
Examples
import { nearbyStarByName } from "@johnmorrisdotca/hoshi-stars/nearby";
import { nearbyInput } from "@johnmorrisdotca/hoshi-stars/distance";
const proxima = nearbyInput(nearbyStarByName("Proxima Centauri")!);
console.log(proxima.id, proxima.lightYears?.toFixed(2), proxima.certainty);gctp-3278 4.24 goodWhat it prints (run when this page was built)