aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util/math
diff options
context:
space:
mode:
author‭huajijam <strhuaji@gmail.com>2019-04-25 23:37:09 +0800
committer‭huajijam <strhuaji@gmail.com>2019-04-25 23:37:09 +0800
commitff60c00c1fc17acf9200cdf794c185ee329b8446 (patch)
tree1372baf2a6a08cc34e9771e5826bb6ee492b2428 /src/Java/gtPlusPlus/core/util/math
parentde9f7710d6f32af0d941085e1029a106b5bc22ff (diff)
parentfccb5447bc424c482f45d3d41e037bdbbd99d823 (diff)
downloadGT5-Unofficial-ff60c00c1fc17acf9200cdf794c185ee329b8446.tar.gz
GT5-Unofficial-ff60c00c1fc17acf9200cdf794c185ee329b8446.tar.bz2
GT5-Unofficial-ff60c00c1fc17acf9200cdf794c185ee329b8446.zip
Automatic synchronization
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/math')
-rw-r--r--src/Java/gtPlusPlus/core/util/math/MathUtils.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
index f9a4d8f548..4ba9d54271 100644
--- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
@@ -692,4 +692,9 @@ public class MathUtils {
return Math.max(Math.min(aInput, aMax), aMin);
}
+ public static int getValueWithinRange(byte aInput, int aMin, int aMax) {
+ int aAmount = Math.max(Math.min(aInput, aMax), aMin);
+ return aAmount;
+ }
+
}