Reference · Rolls and exact odds
mostLikelyfunction
The most likely totals: several when the peak is flat, as it is for one die.
Import it
import { mostLikely } from "@johnmorrisdotca/korokoro";
Definition
function mostLikely(spec: Odds): number[]
Parameters
| Name | Type | Description |
|---|---|---|
spec | Odds | Dice counts, sides, rules and modifier; omitted fields use the documented defaults. |
Returns
number[]
The most likely totals: several when the peak is flat, as it is for one die.
Examples
import { mostLikely } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(mostLikely(spec));[ 7 ]What it prints (run when this page was built)