spinOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A spin from the spin and way attributes: a name, or seconds a turn. A nonsense value is the default, and a negative one is none.
インポート
import { spinOf } from "@johnmorrisdotca/uchusen-rockets";
定義
function spinOf(spin: string | null, way: string | null): Spin
引数
| 名前 | 型 | 説明 |
|---|---|---|
spin | string | null | The |
way | string | null | The |
戻り値
Spin
The spin to use.
例
import { spinOf } from "@johnmorrisdotca/uchusen-rockets";
console.log(spinOf("fast", null), spinOf("30", "ccw"), spinOf("nonsense", null));{ seconds: 20, way: 'cw' } { seconds: 30, way: 'ccw' } { seconds: 180, way: 'cw' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。