diff options
| author | EVE <EVE@EVE-PC> | 2017-03-14 12:07:14 -0400 |
|---|---|---|
| committer | EVE <EVE@EVE-PC> | 2017-03-14 12:07:14 -0400 |
| commit | 504ca816530efdff06bc202e0432ebd354aec304 (patch) | |
| tree | 4836932fb81d1d625470502c78c94d202c9a7420 /BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java | |
| parent | 5c1163df17c46f7d3e15b6c7949c38843ec56146 (diff) | |
Cleanup
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java index d3352df..d15e885 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/NumberUtils.java @@ -4,14 +4,14 @@ import java.util.function.Function; /** * Utility functions for dealing with numbers - * + * * @author ben * */ public class NumberUtils { /** * Compute the falling factorial of a number - * + * * @param value * The number to compute * @param power @@ -19,14 +19,14 @@ public class NumberUtils { * @return The falling factorial of the number to the power */ public static int fallingFactorial(int value, int power) { - if (power == 0) { + if(power == 0) return 1; - } else if (power == 1) { + else if(power == 1) return value; - } else { + else { int result = 1; - for (int currentSub = 0; currentSub < power + 1; currentSub++) { + for(int currentSub = 0; currentSub < power + 1; currentSub++) { result *= value - currentSub; } @@ -36,7 +36,7 @@ public class NumberUtils { /** * Evaluates a linear probability distribution - * + * * @param winning * The number of winning possibilities * @param total |
