diff --git a/arc-core/src/arc/math/Mathf.java b/arc-core/src/arc/math/Mathf.java index bd91bdfe..13115d3c 100644 --- a/arc-core/src/arc/math/Mathf.java +++ b/arc-core/src/arc/math/Mathf.java @@ -400,7 +400,7 @@ public static float clamp(float value, float min, float max){ /** Clamps to [0, 1]. */ public static float clamp(float value){ - return clamp(value, 0f, 1f); + return Math.max(Math.min(value, 1f), 0f); } public static double clamp(double value, double min, double max){