Reference · Map projections for sky charts
MapPointtype
A point on the chart. x runs to the right and y UP (north above the centre), in the units of scale; flip y when you draw on a screen.
Import it
import type { MapPoint } from "@johnmorrisdotca/hoshi-stars/projection";
Definition
interface MapPoint {
x: number;
y: number;
}
Members
| Name | Type | Description |
|---|---|---|
x | number | Across the chart, to the right. East is to the left unless |
y | number | Up the chart. |
Examples
import type { MapPoint } from "@johnmorrisdotca/hoshi-stars/projection";
const middle: MapPoint = { x: 0, y: 0 };
console.log(middle.x + middle.y);0What it prints (run when this page was built)