Function cmb_random_dice

Function Documentation

static inline long cmb_random_dice(const long a, const long b)

A discrete uniform distribution on [a, a+1, a+2, ..., b] for a < b. The function name reflects what happens for a = 1, b = 6.

See also https://en.wikipedia.org/wiki/Discrete_uniform_distribution