Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Rolls and exact odds

spreadOffunction

How far a typical roll lands from the average.

Import it

import { spreadOf } from "@johnmorrisdotca/korokoro";

Definition

function spreadOf(spec: Odds): number

Parameters

NameTypeDescription
specOdds

Dice counts, sides, rules and modifier; omitted fields use the documented defaults.

Returns

number

How far a typical roll lands from the average.

Examples

import { spreadOf } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(spreadOf(spec));
2.41522945769824

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.