roll

fun roll(): T(source)

Rolls the die and returns one outcome, selected with probability proportional to its weight.

Return

a randomly selected outcome of type T.