Browse Source

AK: Allow clamp() with min==max

Andreas Kling 5 years ago
parent
commit
2309029cb4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AK/StdLibExtras.h

+ 1 - 1
AK/StdLibExtras.h

@@ -87,7 +87,7 @@ inline constexpr T max(const T& a, const T& b)
 template<typename T>
 inline constexpr T clamp(const T& value, const T& min, const T& max)
 {
-    ASSERT(max > min);
+    ASSERT(max >= min);
     if (value > max)
         return max;
     if (value < min)