Added zoom functionality

This commit is contained in:
2025-04-23 22:32:13 +02:00
parent 2c95b5e374
commit 963002570d
7 changed files with 123 additions and 3 deletions

View File

@ -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("/");
}