I am trying to write a random number generator function in C # that will take the parameters minimum , maximum and weight .
With weight == 0 the result will be equal to the minimum, and with weight == 1 the result will be equal to the maximum. With a weight of == 0.5, all numbers within the range will have an equal chance of choice.
What I want to achieve is that the weight is approaching the minimum, the minimum has more chances to be selected, and the maximum is less, and vice versa.
source
share