system関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A planet and its moons as the Earth sees them at a time: each moon's place in planet radii, in the viewer's frame (x right, y up, z toward the viewer).
インポート
import { system } from "@johnmorrisdotca/wakusei-planets";
定義
function system(planet: HostId, time: number): System
引数
| 名前 | 型 | 説明 |
|---|---|---|
planet | HostId | The planet's name. |
time | number | The instant, in milliseconds since 1970. |
戻り値
System
The planet's pose and every moon of it, nearest first.
例
import { system } from "@johnmorrisdotca/wakusei-planets";
const { moons } = system("jupiter", Date.UTC(2026, 10, 2, 12));
console.log(moons.map((moon) => `${moon.id} ${moon.x.toFixed(1)}`).join(", "));io -5.0, europa -5.5, ganymede -13.9, callisto -20.0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。