Reference · Rolls and exact odds
TotalStatstype
The totals of one spec: seen against what the odds promise.
Import it
import type { TotalStats } from "@johnmorrisdotca/korokoro";
Definition
type TotalStats = {
notation: string;
rolls: number;
average: number;
expected: number;
highest: number;
lowest: number;
min: number;
seen: number[];
expectedShare: number[];
};
Members
| Name | Type | Description |
|---|---|---|
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[] |
Examples
import type { TotalStats } from "@johnmorrisdotca/korokoro";
import { DEFAULT_SPEC, totalStats } from "@johnmorrisdotca/korokoro";
const value: TotalStats = totalStats([], DEFAULT_SPEC);
console.log(value.rolls);0What it prints (run when this page was built)