DistanceValue型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A length in the two units the package gives distances in.
インポート
import type { DistanceValue } from "@johnmorrisdotca/hoshi-stars/deep-sky";
ほかのエクスポート元: @johnmorrisdotca/hoshi-stars/deep-sky/ngc-ic
定義
interface DistanceValue {
lightYears: number;
parsecs: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
lightYears | number | The length in light-years. |
parsecs | number | The length in parsecs. |
例
import { galaxyDistance, type DistanceValue } from "@johnmorrisdotca/hoshi-stars/deep-sky";
import { deepSkyObject } from "@johnmorrisdotca/hoshi-stars/deep-sky";
const away: DistanceValue = galaxyDistance(deepSkyObject("M31")!)!.spread.low;
console.log(away.lightYears, away.parsecs);2674482.297277295 820000出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。