From 018fc6e51683545fbdb4c0d76d80d6db3a982fbb Mon Sep 17 00:00:00 2001 From: draknyte1 Date: Tue, 7 Feb 2017 14:16:52 +1000 Subject: + Added a returnLargestNumber function to MathUtils.java + Wrote up some really bad version parsing code, will replace with a Regex function later. % Changed Growthcraft FishTrap handling to support newer versions. --- src/Java/gtPlusPlus/core/util/math/MathUtils.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Java/gtPlusPlus/core/util/math') diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java index c864df491c..a7cb916d0d 100644 --- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java @@ -266,5 +266,18 @@ public class MathUtils { } return Utils.rgbtoHexValue(RGBA[0], RGBA[1], RGBA[2]); } + + + public final static int returnLargestNumber(int a, int b){ + if (a > b){ + return a; + } + else if (a == b){ + return a; + } + else { + return b; + } + } } -- cgit