Added zoom functionality
This commit is contained in:
@ -3,6 +3,18 @@ package wtf.hak.survivalfabric.utils;
|
||||
public class MathUtils {
|
||||
|
||||
|
||||
public static double clamp(double value, double min, double max) {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
}
|
||||
|
||||
public static float clamp(float value, float min, float max) {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
}
|
||||
|
||||
public static int clamp(int value, int min, int max) {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
}
|
||||
|
||||
public static boolean hasSupportedOperator(String msg) {
|
||||
return msg.contains("+") || msg.contains("-") || msg.contains("*") || msg.contains("/");
|
||||
}
|
||||
|
Reference in New Issue
Block a user