Use std::clamp.

This commit is contained in:
Stephen Anthony 2024-07-30 16:42:48 -02:30
parent 69b300b6f9
commit 56e6bd69bc
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ namespace BSPF
// if it is outside the specified range
template<typename T> inline constexpr T clamp(T val, T lower, T upper)
{
return (val < lower) ? lower : (val > upper) ? upper : val;
return std::clamp<T>(val, lower, upper);
}
template<typename T> inline constexpr void clamp(T& val, T lower, T upper, T setVal)
{