DistanceAt型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The least or the greatest distance of a pair over a span, and when.
インポート
import type { DistanceAt } from "@johnmorrisdotca/wakusei-planets/nearest";
定義
interface DistanceAt {
time: Date;
distanceKm: number;
distanceAu: number;
uncertaintyKm: number;
atEdge: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
time | Date | The moment, to about a second of time. |
distanceKm | number | |
distanceAu | number | |
uncertaintyKm | number | The accuracy to expect of |
atEdge | boolean | True when this is the span's start or end, not a turning point inside it. |
例
import { distanceRange, type DistanceAt } from "@johnmorrisdotca/wakusei-planets/nearest";
const least: DistanceAt = distanceRange("earth", "mars", { from: Date.UTC(2003, 0, 1), to: Date.UTC(2004, 0, 1) }).min;
console.log(least.time.toISOString().slice(0, 10), least.distanceAu.toFixed(3));2003-08-27 0.373出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。