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

mathGroupsfunction

Which kinds of dice a formula uses, in the order it names them.

Import it

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

Definition

function mathGroups(node: MathNode): number[]

Parameters

NameTypeDescription
nodeMathNode

The arithmetic expression tree.

Returns

number[]

Which kinds of dice a formula uses, in the order it names them.

Examples

import { mathGroups } from "@johnmorrisdotca/korokoro";
console.log(mathGroups({ kind: "dice", group: 0 }));
[ 0 ]

What it prints (run when this page was built)

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