リファレンス · 星・天体・位置の近くにあるもの (空と宇宙で)、隣り合う星座
within関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Everything within a radius of a target, nearest first: nearest with no count limit and within set to the radius.
インポート
import { within } from "@johnmorrisdotca/hoshi-stars/nearest";
定義
function within(target: NearestTarget, radius: number, options: SkyOptions & { kind: "deep-sky"; among?: undefined; }): NearestList<NearestInSky<DeepSkyObject>>
function within<T extends NearestThing>(target: NearestTarget, radius: number, options: SkyOptions & { kind?: "star" | "deep-sky"; among: readonly T[]; }): NearestList<NearestInSky<T>>
function within(target: NearestTarget, radius: number, options?: SkyOptions & { kind?: "star"; among?: undefined; }): NearestList<NearestInSky>
function within<T extends NearestThing>(target: NearestTarget, radius: number, options: NearestOptions & { by: "space"; among: readonly T[]; }): NearestList<NearestInSpace<Extract<T, Star | NearbyStar>>>
function within(target: NearestTarget, radius: number, options: NearestOptions & { by: "space"; }): NearestList<NearestInSpace>
function within(target: NearestTarget, radius: number, options: NearestOptions): NearestList<NearestInSky<NearestThing> | NearestInSpace<Star | NearbyStar>>
引数
| 名前 | 型 | 説明 |
|---|---|---|
target | NearestTarget | As for |
radius | number | Degrees by angle, light-years by space (0 or more). |
options | NearestOptions | As for |
戻り値
NearestList<NearestInSky<NearestThing> | NearestInSpace<Star | NearbyStar>>
As for nearest.
例
import { within } from "@johnmorrisdotca/hoshi-stars/nearest";
console.log(within("Alcyone", 2, { magnitude: 5 }).length);5出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。