ApproachOptionstype
Where a search looks, and what counts as close.
Import it
import type { ApproachOptions } from "@johnmorrisdotca/wakusei-planets/nearest";
Definition
interface ApproachOptions {
from: When;
to: When;
by?: "sky" | "space";
observer?: Viewpoint;
}
Members
| Name | Type | Description |
|---|---|---|
from | When | The start of the span, a |
to | When | The end of the span. |
by (optional) | "sky" | "space" | undefined |
|
observer (optional) | Viewpoint | undefined | Where the sky is seen from; ignored by |
Examples
import { closestApproach, type ApproachOptions } from "@johnmorrisdotca/wakusei-planets/nearest";
const options: ApproachOptions = { from: Date.UTC(2023, 1, 20), to: Date.UTC(2023, 2, 10) };
console.log(closestApproach("venus", "jupiter", options).time.toISOString());2023-03-02T05:05:40.522ZWhat it prints (run when this page was built)