Skip to content

Function: distributionOf() ​

ts
function distributionOf(spec): Distribution;

Defined in: src/odds.ts:369

Every total a spec can make and its chance. Several kinds of dice are independent, so their totals are put together by convolution: every pair of totals, their chances multiplied. Worked out once for each spec, then remembered.

Parameters ​

spec ​

RollSpec

Returns ​

Distribution

MIT © John Morris