diff --git a/src/main/java/net/fexcraft/lib/mc/utils/Static.java b/src/main/java/net/fexcraft/lib/mc/utils/Static.java index fef6dcd..7071664 100644 --- a/src/main/java/net/fexcraft/lib/mc/utils/Static.java +++ b/src/main/java/net/fexcraft/lib/mc/utils/Static.java @@ -134,4 +134,12 @@ public static InputStream getResource(String str){ } } + public static double clamp(double val, double min, double max){ + return val < min ? min : val > max ? max : val; + } + + public static float clamp(float val, float min, float max){ + return val < min ? min : val > max ? max : val; + } + } \ No newline at end of file