greatCircleKm関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The great-circle distance, kilometres, on a sphere of MEAN_RADIUS_KM. The same angle trackSteps uses between two unit vectors.
インポート
import { greatCircleKm } from "@johnmorrisdotca/chikyu-earth";
定義
function greatCircleKm(from: GeoPoint, to: GeoPoint): number | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
from | GeoPoint | The start, degrees. |
to | GeoPoint | The end, degrees. |
戻り値
number | null
The distance, or null when a place is not on the Earth.
例
import { greatCircleKm } from "@johnmorrisdotca/chikyu-earth";
console.log(greatCircleKm({ lon: 0, lat: 0 }, { lon: 0, lat: 0 }));0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。