I use the method:
public static double GenerateRandomDoubleValueBetweenLowerBoundAndUpperBound(double lowerBound,
double upperBound)
{
return rnd.NextDouble() * (upperBound - lowerBound) + lowerBound;
}
The value upperBound itself is never generated. How can I modify the method to be able to generate the value upperBound inclusively? Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire