リファレンス · データの入口(自分で用意した地球の地図や軌道データを、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)
wrapLon関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Fold a longitude into the half-open range from -180 up to, but not including, 180. 180 and -180 are the same meridian, and both come back as -180.
インポート
import { wrapLon } from "@johnmorrisdotca/chikyu-earth/door";
定義
function wrapLon(lon: number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
lon | number | A longitude in degrees, which may fall outside one turn. |
戻り値
number
The longitude in [-180, 180).
例
import { wrapLon } from "@johnmorrisdotca/chikyu-earth/door";
console.log(wrapLon(180), wrapLon(-180), wrapLon(190));-180 -180 -170出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。