From a39155a23eb19236a2f808ef32ca933f4389d87e Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 6 Oct 2024 21:18:32 -0400 Subject: [PATCH] A rather insignificant "optimization" --- arc-core/src/arc/math/Mathf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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){