TotalStats型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The totals of one spec: seen against what the odds promise.
インポート
import type { TotalStats } from "@johnmorrisdotca/korokoro";
定義
type TotalStats = {
notation: string;
rolls: number;
average: number;
expected: number;
highest: number;
lowest: number;
min: number;
seen: number[];
expectedShare: number[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
notation | string | The spec, as notation. |
rolls | number | How many rolls of this spec the history holds. |
average | number | The mean of their totals; 0 with no rolls. |
expected | number | The mean the odds promise. |
highest | number | The highest total rolled; 0 with no rolls. |
lowest | number | The lowest total rolled; 0 with no rolls. |
min | number | The lowest total the dice can make. |
seen | number[] | seen[i] and expected[i] are for a total of min + i. |
expectedShare | number[] |
例
import type { TotalStats } from "@johnmorrisdotca/korokoro";
import { DEFAULT_SPEC, totalStats } from "@johnmorrisdotca/korokoro";
const value: TotalStats = totalStats([], DEFAULT_SPEC);
console.log(value.rolls);0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。