Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Maths1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
samuel.boulton
Maths1
Commits
0c4946a7
Commit
0c4946a7
authored
Dec 11, 2018
by
samuel.boulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished
parent
bf9ffad1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Program.java
src/Program.java
+8
-8
No files found.
src/Program.java
View file @
0c4946a7
...
...
@@ -650,17 +650,17 @@ public static int Range (int[] input) {
}
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment