placeVector関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { placeVector } from "@johnmorrisdotca/chikyu-earth/meteors";
定義
function placeVector(point: GeoPoint): [number, number, number]
引数
| 名前 | 型 | 説明 |
|---|---|---|
point | GeoPoint | Longitude and latitude, in degrees. |
戻り値
[number, number, number]
The unit vector from the Earth's centre to that place.
例
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 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。