5#ifndef BASE_NUMERICS_CLAMPED_MATH_H_
6#define BASE_NUMERICS_CLAMPED_MATH_H_
20 "ClampedNumeric<T>: T must be a numeric type.");
28 template <
typename Src>
32 template <
typename Src>
37 template <
typename Src>
45 template <
typename Src>
52 template <
typename Dst>
58 template <
typename Src>
60 template <
typename Src>
62 template <
typename Src>
64 template <
typename Src>
66 template <
typename Src>
68 template <
typename Src>
70 template <
typename Src>
72 template <
typename Src>
74 template <
typename Src>
76 template <
typename Src>
103 template <
typename U>
144 template <
template <
typename,
typename,
typename>
class M,
154 template <
template <
typename,
typename,
typename>
class M,
typename R>
162 template <
typename Dst>
163 constexpr operator Dst()
const {
178 template <
typename Src>
194#if !BASE_NUMERICS_DISABLE_OSTREAM_OPERATORS
198 os << static_cast<T>(
value);
204template <
template <
typename,
typename,
typename>
class M,
216template <
template <
typename,
typename,
typename>
class M,
222 return ClampMathOp<M>(ClampMathOp<M>(lhs, rhs),
args...);
246using internal::ClampAdd;
247using internal::ClampAnd;
248using internal::ClampDiv;
250using internal::ClampLsh;
251using internal::ClampMax;
252using internal::ClampMin;
253using internal::ClampMod;
254using internal::ClampMul;
255using internal::ClampOr;
256using internal::ClampRsh;
257using internal::ClampSub;
258using internal::ClampXor;
constexpr ClampedNumeric & operator&=(const Src rhs)
constexpr ClampedNumeric Abs() const
constexpr ClampedNumeric(StrictNumeric< Src > value)
constexpr ClampedNumeric & operator+=(const Src rhs)
constexpr ClampedNumeric & operator-=(const Src rhs)
constexpr ClampedNumeric operator++(int)
static constexpr ClampedNumeric MathOp(const L lhs, const R rhs)
constexpr ClampedNumeric< typename MathWrapper< ClampedMinOp, T, U >::type > Min(const U rhs) const
constexpr ClampedNumeric & operator^=(const Src rhs)
constexpr ClampedNumeric< typename MathWrapper< ClampedMaxOp, T, U >::type > Max(const U rhs) const
constexpr ClampedNumeric & operator*=(const Src rhs)
constexpr ClampedNumeric & operator%=(const Src rhs)
constexpr ClampedNumeric & operator|=(const Src rhs)
constexpr ClampedNumeric(const ClampedNumeric< Src > &rhs)
constexpr ClampedNumeric(Src value)
constexpr ClampedNumeric & MathOp(const R rhs)
constexpr ClampedNumeric< typename UnderlyingType< Dst >::type > Cast() const
constexpr ClampedNumeric operator~() const
constexpr ClampedNumeric & operator>>=(const Src rhs)
constexpr T RawValue() const
constexpr ClampedNumeric()
constexpr ClampedNumeric & operator++()
constexpr ClampedNumeric operator--(int)
constexpr ClampedNumeric< typename UnsignedOrFloatForSize< T >::type > UnsignedAbs() const
constexpr ClampedNumeric & operator/=(const Src rhs)
constexpr ClampedNumeric & operator<<=(const Src rhs)
constexpr ClampedNumeric & operator--()
constexpr ClampedNumeric operator-() const
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
constexpr std::make_unsigned< T >::type SafeUnsignedAbs(T value)
constexpr ClampedNumeric< typename MathWrapper< M, L, R >::type > ClampMathOp(const L lhs, const R rhs)
constexpr T SaturatedNegWrapper(T value)
std::ostream & operator<<(std::ostream &os, const ClampedNumeric< T > &value)
constexpr ClampedNumeric< typename UnderlyingType< T >::type > MakeClampedNum(const T value)
constexpr Dst saturated_cast(Src value)
constexpr T SaturatedAbsWrapper(T value)
constexpr std::make_unsigned< T >::type InvertWrapper(T value)
static CompileType * ResultType(Definition *call)
static constexpr Color Min(Color c, float threshold)
#define BASE_NUMERIC_COMPARISON_OPERATORS(CLASS, NAME, OP)
#define BASE_NUMERIC_ARITHMETIC_OPERATORS(CLASS, CL_ABBR, OP_NAME, OP, CMP_OP)
#define BASE_NUMERIC_ARITHMETIC_VARIADIC(CLASS, CL_ABBR, OP_NAME)
typename math::result_type type
M< typename UnderlyingType< L >::type, typename UnderlyingType< R >::type, void > math
typename ArithmeticOrUnderlyingEnum< T >::type type