リファレンス · 星・天体・位置の近くにあるもの (空と宇宙で)、隣り合う星座
NearestTarget型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a query starts: a star, a deep-sky object, a name starByName or deepSkyObject (the Messier objects) finds, or a point in J2000 degrees. A point may carry lightYears to be used with by: "space". A point in space is { x, y, z } in parsecs on the J2000 equatorial axes with the Sun at the origin (x toward right ascension 0, z toward the north pole), like the star browser of a planetarium; it works by angle too, as the direction from the Sun.
インポート
import type { NearestTarget } from "@johnmorrisdotca/hoshi-stars/nearest";
定義
type NearestTarget = Star | NearbyStar | DeepSkyObject | string | {
rightAscension: number;
declination: number;
lightYears?: number;
} | {
x: number;
y: number;
z: number;
};
例
import { nearest, type NearestTarget } from "@johnmorrisdotca/hoshi-stars/nearest";
const target: NearestTarget = { rightAscension: 83.8, declination: -5.4 };
console.log(nearest(target, { count: 1 })[0]?.thing.name);undefined出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。