diff options
author | â€huajijam <strhuaji@gmail.com> | 2019-04-25 23:37:09 +0800 |
---|---|---|
committer | â€huajijam <strhuaji@gmail.com> | 2019-04-25 23:37:09 +0800 |
commit | ff60c00c1fc17acf9200cdf794c185ee329b8446 (patch) | |
tree | 1372baf2a6a08cc34e9771e5826bb6ee492b2428 /src/Java/gtPlusPlus/core/util/math | |
parent | de9f7710d6f32af0d941085e1029a106b5bc22ff (diff) | |
parent | fccb5447bc424c482f45d3d41e037bdbbd99d823 (diff) | |
download | GT5-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.java | 5 |
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; + } + } |