steppedPlace関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The place after seconds of play. rate is story seconds in one real second. With watch, the flight underway takes WATCH_FLIGHT_S real seconds, whatever rate is.
インポート
import { steppedPlace } from "@johnmorrisdotca/uchusen-rockets";
定義
function steppedPlace(steps: readonly PlayStep[], at: number, seconds: number, rate: number, watch: boolean): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
at | number | How far through the build, from 0 to 1. |
seconds | number | Real seconds just elapsed. |
rate | number | Story seconds in one real second. |
watch | boolean | Whether one flight should take |
戻り値
number
The place, from 0 to 1.
例
import { steppedPlace } from "@johnmorrisdotca/uchusen-rockets";
const steps = [{ slot: "keel", start: 0, days: 10 }];
console.log(steppedPlace(steps, 0, 30, 1, true));1出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。