Dice.Roll<T>
Static Method in Dice
Declaration
public static T Roll<T>(T[] dice)Description
Rolls a custom dice.
Type Parameters
| T | The type of values of the dice. |
Parameters
| dice | The values of the dice. |
Returns
| T | A random value on the dice. |
Overload
Declaration
public static T Roll<T>(T[] dice, int[] weights)Description
Rolls a custom dice with weighted probabilities.
Type Parameters
| T | The type of values of the dice. |
Parameters
| dice | The values of the dice. |
| weights | The probabilities of each value. |
Returns
| T | A random value on the dice. |