@@ -0,0 +1,1191 @@
+/*%0A */%0Apackage com.agricraft.agricore.util;%0A%0A/**%0A *%0A * @author RlonRyan%0A */%0Apublic class MathHelper %7B%0A%09%0A%09/**%0A%09 * Brings an integer into a specified range.%0A%09 *%0A%09 * @param value The value to bring into the range.%0A%09 * @param min The minimum value, inclusive.%0A%09 * @param max The maximum value, inclusive.%0A%09 * @return The in-bounded value.%0A%09 */%0A%09public static int inRange(int value, int min, int max) %7B%0A%09%09return value %3C min ? min : value %3E max ? max : value;%0A%09%7D%0A%09%0A%09/**%0A%09 * Brings an integer into a specified range.%0A%09 *%0A%09 * @param value The value to bring into the range.%0A%09 * @param min The minimum value, inclusive.%0A%09 * @param max The maximum value, inclusive.%0A%09 * @return The in-bounded value.%0A%09 */%0A%09public static float inRange(float value, float min, float max) %7B%0A%09%09return value %3C min ? min : value %3E max ? max : value;%0A%09%7D%0A%09%0A%09/**%0A%09 * Brings an integer into a specified range.%0A%09 *%0A%09 * @param value The value to bring into the range.%0A%09 * @param min The minimum value, inclusive.%0A%09 * @param max The maximum value, inclusive.%0A%09 * @return The in-bounded value.%0A%09 */%0A%09public static double inRange(double value, double min, double max) %7B%0A%09%09return value %3C min ? min : value %3E max ? max : value;%0A%09%7D%0A%09%0A%7D%0A

Add Math Helper Class