mathRange関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The least and the most a sound formula can come to, given each kind's range.
インポート
import { mathRange } from "@johnmorrisdotca/korokoro";
定義
function mathRange(node: MathNode, ranges: readonly { min: number; max: number; }[]): { min: number; max: number; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
node | MathNode | The arithmetic expression tree. |
ranges | readonly { min: number; max: number; }[] | The minimum and maximum for each dice group. |
戻り値
{ min: number; max: number; }
The least and the most a sound formula can come to, given each kind's range.
例
import { mathRange } from "@johnmorrisdotca/korokoro";
console.log(mathRange({ kind: "dice", group: 0 }, [{ min: 1, max: 6 }]));{ min: 1, max: 6 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。