turn関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A piece turned quarters quarter turns clockwise; a negative number turns it the other way.
インポート
import { turn } from "@johnmorrisdotca/suido";
定義
function turn(mask: number, quarters?: number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
quarters (省略可) | number | Clockwise quarter turns, per cell or for the piece specified by the signature. |
戻り値
number
A piece turned quarters quarter turns clockwise; a negative number turns it the other way.
例
import { turn } from "@johnmorrisdotca/suido";
console.log(turn(3,1));6出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。