From 3873f96cfba7be82dd8731ca5b2fac2fc16947a5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 Oct 2023 21:13:34 -0700 Subject: [PATCH] Rename mathlib clamp to V_clamp. --- public/mathlib/mathlib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/mathlib/mathlib.h b/public/mathlib/mathlib.h index 0c032a71..6e662e79 100644 --- a/public/mathlib/mathlib.h +++ b/public/mathlib/mathlib.h @@ -624,7 +624,7 @@ template FORCEINLINE T AVG(T a, T b) // // Returns a clamped value in the range [min, max]. // -#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) +#define V_clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) inline float Sign( float x ) { @@ -1061,7 +1061,7 @@ inline float SimpleSplineRemapValClamped( float val, float A, float B, float C, if ( A == B ) return val >= B ? D : C; float cVal = (val - A) / (B - A); - cVal = clamp( cVal, 0.0f, 1.0f ); + cVal = V_clamp( cVal, 0.0f, 1.0f ); return C + (D - C) * SimpleSpline( cVal ); }