Commit 0c4946a7 authored by samuel.boulton's avatar samuel.boulton

finished

parent bf9ffad1
......@@ -648,19 +648,19 @@ public static int Range (int[] input) {
return result;
}
public static double GetProbabilityOfResultOrHigher(int dieSides, int rolls, int sum) {
double[] distribution = GenerateRandomDistribution(dieSides,rolls,100000);
double result = 0;
for(int i = 0; i < distribution.length; i++)
{
if(i >= sum)
{
result += distribution[i];
}
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment