faceChances関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every face of one die of a group with its chance, beside the fair die's. For a custom die of words this is its odds: the faces have no total to have odds of.
インポート
import { faceChances } from "@johnmorrisdotca/korokoro";
定義
function faceChances(group: DiceGroup): FaceChance[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
group | DiceGroup | One kind of dice and its rules. |
戻り値
FaceChance[]
Every face of one die of a group with its chance, beside the fair die's. For a custom die of words this is its odds: the faces have no total to have odds of.
例
import { faceChances } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(faceChances(spec)[0]);{
face: 1,
label: '1',
chance: 0.16666666666666666,
fair: 0.16666666666666666
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。