within関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every satellite within radius of a target, nearest first. Kilometres for by: "space", degrees for by: "sky". The same one pass as nearest.
インポート
import { within } from "@johnmorrisdotca/chikyu-earth/satellites";
定義
function within(group: Satellites, target: NearestTarget, radius: number, options: Omit<NearestOptions, "count" | "within">): Neighbour[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
group | Satellites | The satellites. |
target | NearestTarget | A place, a direction, or a satellite. |
radius | number | The limit, in the unit |
options | Omit<NearestOptions, "count" | "within"> | As |
戻り値
Neighbour[]
The neighbours inside the limit.
例
import { createSatellites, within } from "@johnmorrisdotca/chikyu-earth/satellites";
const group = createSatellites([]);
console.log(within(group, { place: { lon: 0, lat: 0 } }, 1000, { date: Date.UTC(2026, 10, 2) }).length);0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。