mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
AK: Allow clamp() with min==max
This commit is contained in:
parent
e901a3695a
commit
2309029cb4
Notes:
sideshowbarker
2024-07-19 09:56:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2309029cb4e
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue