rotationAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The rotation at now for a globe that was centred on centre at start. The tilt stays; the spin advances at the
Earth's own rate, so the disc turns as the real Earth does and the centred place drifts with it.
インポート
import { rotationAt } from "@johnmorrisdotca/chikyu-earth";
定義
function rotationAt(centre: GeoPoint, now: number, start: number): Rotation
引数
| 名前 | 型 | 説明 |
|---|---|---|
centre | GeoPoint | The place the globe was centred on at |
now | number | The time to draw for, in milliseconds. |
start | number | The time the globe was centred, in the same milliseconds as |
戻り値
Rotation
The [lambda, phi] rotation at now.
例
import { rotationAt, SIDEREAL_DAY_MS } from "@johnmorrisdotca/chikyu-earth";
const tokyo = { lon: 139.7, lat: 35.7 };
console.log(rotationAt(tokyo, SIDEREAL_DAY_MS / 2, 0));[ 40.30000000000001, -35.7 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。