aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-14 20:03:07 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-14 20:03:07 +0000
commit1f48c6da89afb649c3b73674cb3c0664fa322a09 (patch)
tree493e5d87627fd9bb4de7eeb4094640108c04bf64 /src/Java/gtPlusPlus/core/util
parente562aa2059d09840cf2a3ad9333e477bcb670cd9 (diff)
downloadGT5-Unofficial-1f48c6da89afb649c3b73674cb3c0664fa322a09.tar.gz
GT5-Unofficial-1f48c6da89afb649c3b73674cb3c0664fa322a09.tar.bz2
GT5-Unofficial-1f48c6da89afb649c3b73674cb3c0664fa322a09.zip
+ Added recipes for the Large Arc Furnace and Casings.
- Disabled power output on Alternative Fusion. % Made the AutoMap implement Collection and Queue. $ Fixed energy buffers return bad inventory name.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/math/MathUtils.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
index 40ac23a1b8..030099cff1 100644
--- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
@@ -681,4 +681,15 @@ public class MathUtils {
return i;
}
+ /**
+ * Balances a number within a range.
+ * @param aInput - The number to balance
+ * @param aMin - The minimum bounds
+ * @param aMax - The maximum bounds
+ * @return - An Integer which will be between the bounds, or a boundary value.
+ */
+ public static int balance(int aInput, int aMin, int aMax) {
+ return Math.max(Math.min(aInput, aMax), aMin);
+ }
+
}