to come up, in which case 1 + uniform(0, 6) can simply be used. In future Phobos versions, this function might get renamed to something like weightedChoice to avoid confusion.
Parameters
rnd | (optional) random number generator to use; if not specified, defaults to rndGen |
proportions | forward range or list of individual values whose elements correspond to the probabilities with which to choose the corresponding index value |
Returns
Random variate drawn from the index values
[0, ... proportions.length - 1], with the probability of getting an individual index value i being proportional to proportions[i].