DistanceRangetype
Where a pair is nearest and farthest over a span.
Import it
import type { DistanceRange } from "@johnmorrisdotca/wakusei-planets/nearest";
Definition
interface DistanceRange {
a: BodyId;
b: BodyId;
min: DistanceAt;
max: DistanceAt;
}
Members
| Name | Type | Description |
|---|---|---|
a | BodyId | |
b | BodyId | |
min | DistanceAt | |
max | DistanceAt |
Examples
import { distanceRange, type DistanceRange } from "@johnmorrisdotca/wakusei-planets/nearest";
const range: DistanceRange = distanceRange("venus", "earth", { from: Date.UTC(2026, 0, 1), to: Date.UTC(2028, 0, 1) });
console.log(range.min.distanceAu.toFixed(2), range.max.distanceAu.toFixed(2));0.27 1.73What it prints (run when this page was built)