terminatorfunction
The line between day and night at a moment: the points 90 degrees from where the Sun is straight overhead, as longitude and latitude.
Import it
import { terminator } from "@johnmorrisdotca/chikyu-earth/sheets";
Definition
function terminator(ms: number, points?: number): [number, number][]
Parameters
| Name | Type | Description |
|---|---|---|
ms | number | The moment, in milliseconds since the Unix epoch. |
points (optional) | number | How many points (at least 3, default 72). |
Returns
[number, number][]
The points in order round the Earth.
Examples
import { terminator } from "@johnmorrisdotca/chikyu-earth/sheets";
console.log(terminator(Date.UTC(2026, 2, 20, 12), 8).length);8What it prints (run when this page was built)