Package com.shanebeestudios.nms.api.util
Class MathUtils
java.lang.Object
com.shanebeestudios.nms.api.util.MathUtils
Utility class for math methods
-
Method Summary
-
Method Details
-
clamp
public static float clamp(float num, float min, float max) Clamp a float between a min and a max- Parameters:
num
- Float to clampmin
- Min valuemax
- Max value- Returns:
- Clamped float
-
clamp
public static int clamp(int num, int min, int max) Clamp an int between a min and a max- Parameters:
num
- Int to clampmin
- Min valuemax
- Max value- Returns:
- Clamped int
-