placeVectorfunction
A place as a unit vector: x to longitude 90 east on the equator, y to the north pole, z to longitude 0 on the equator (the realistic Earth's own axes).
Import it
import { placeVector } from "@johnmorrisdotca/chikyu-earth/meteors";
Definition
function placeVector(point: GeoPoint): [number, number, number]
Parameters
| Name | Type | Description |
|---|---|---|
point | GeoPoint | Longitude and latitude, in degrees. |
Returns
[number, number, number]
The unit vector from the Earth's centre to that place.
Examples
import { placeVector } from "@johnmorrisdotca/chikyu-earth/meteors";
console.log(placeVector({ lon: 0, lat: 90 }).map((n) => Math.round(n))); // [0, 1, 0][ 0, 1, 0 ]What it prints (run when this page was built)