variadic min/max

This commit is contained in:
BlackMATov
2020-12-06 05:38:00 +07:00
parent 422d251df1
commit b0659e9239
3 changed files with 32 additions and 2 deletions

View File

@@ -617,6 +617,9 @@ T acosh(T x) noexcept;
template < floating_point T >
T atanh(T x) noexcept;
template < floating_point T >
std::pair<T, T> sincos(T x) noexcept;
template < floating_point T >
void sincos(T x, T* s, T* c) noexcept;
@@ -759,9 +762,15 @@ T modf(T x, T* y) noexcept;
template < arithmetic T >
constexpr T min(T x, T y) noexcept;
template < arithmetic T, arithmetic... Ts >
constexpr std::common_type_t<T, Ts...> min(T x, T y, Ts... ts) noexcept;
template < arithmetic T >
constexpr T max(T x, T y) noexcept;
template < arithmetic T, arithmetic... Ts >
constexpr std::common_type_t<T, Ts...> max(T x, T y, Ts... ts) noexcept;
template < arithmetic T >
constexpr T clamp(T x, T min_x, T max_x) noexcept;