From e39f9829033295369256a7a074db768320b01192 Mon Sep 17 00:00:00 2001 From: gk646 Date: Sun, 7 Apr 2024 20:37:46 +0200 Subject: [PATCH] fix typo --- src/cxutil/cxmath.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cxutil/cxmath.h b/src/cxutil/cxmath.h index a1da2e5..07749ed 100644 --- a/src/cxutil/cxmath.h +++ b/src/cxutil/cxmath.h @@ -100,7 +100,7 @@ inline float fast_sqrt(float n) noexcept { * @param high highest possible value * @return low if val is smaller than low, val if val is between low and high, and high if val is bigger than high */ -template +template ::value, int> = 0> inline constexpr T clamp(const T& val, const T& low, const T& high) { if (val < low) { return low; @@ -110,7 +110,7 @@ inline constexpr T clamp(const T& val, const T& low, const T& high) { return val; } -template ::value>> +template ::value, int> = 0> inline constexpr T clamp(T val, T low, T high) { if (val < low) { return low; @@ -120,6 +120,7 @@ inline constexpr T clamp(T val, T low, T high) { return val; } + //-----------DISTANCE-----------// inline float euclidean(float p1x, float p1y, float p2x, float p2y) noexcept { return fast_sqrt((p2x - p1x) * (p2x - p1x) + (p2y - p1y) * (p2y - p1y));