リファレンス · 日付ごとの太陽・月・惑星の位置を、二つの縮尺で。カメラの計算つき
radiusIn関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A body's radius in Earth radii: the real one, or one large enough to see in a compressed view.
インポート
import { radiusIn } from "@johnmorrisdotca/wakusei-planets/space";
定義
function radiusIn(id: "sun" | "earth" | "moon" | SpacePlanet, mode: ScaleMode): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | "sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon" | The Sun, the Earth, the Moon or a planet. |
mode | ScaleMode | The scale. |
戻り値
number
The radius to draw it at, in Earth radii.
例
import { radiusIn } from "@johnmorrisdotca/wakusei-planets/space";
console.log(radiusIn("moon", "true").toFixed(3), radiusIn("moon", "compressed"));0.272 0.9出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。