47 static_assert(std::is_arithmetic<T>::value,
"Template argument of Interval must be arithmetic.");
63 constexpr RangeT(T minimum, T maximum, T increment)
65 , m_increment{ increment }
67 if (increment > maximum - minimum)
110 return !(rhs == *
this);
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:50
Represents a continuous numeric interval with inclusive lower and upper bounds.
Definition peak_common_interval.hpp:44
constexpr IntervalT(double minimum, double maximum)
Definition peak_common_interval.hpp:61
constexpr bool operator==(const IntervalT< H > &rhs) const
Compares two intervals for equality (integral types).
Definition peak_common_interval.hpp:109
Represents a numeric range with defined boundaries and a fixed increment.
Definition peak_common_range.hpp:44
constexpr bool operator==(const RangeT &rhs) const
Compares this range with another for equality.
Definition peak_common_range.hpp:95
PEAK_COMMON_NO_DISCARD constexpr T GetIncrement() const
Retrieves the increment value associated with this range.
Definition peak_common_range.hpp:80
constexpr RangeT(T minimum, T maximum, T increment)
Constructs a range with specified minimum, maximum, and increment values.
Definition peak_common_range.hpp:63
constexpr bool operator!=(const RangeT &rhs) const
Compares this range with another for inequality.
Definition peak_common_range.hpp:108
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.hpp:91
detail::RangeT< int32_t > Range
Alias for a range of 32-bit signed integers.
Definition peak_common_range.hpp:147
detail::RangeT< float > RangeF
Alias for a range of 32-bit floating-point numbers.
Definition peak_common_range.hpp:162
detail::RangeT< uint8_t > RangeU8
Alias for a range of 8-bit unsigned integers.
Definition peak_common_range.hpp:177
detail::RangeT< uint32_t > RangeU
Alias for a range of 32-bit unsigned integers.
Definition peak_common_range.hpp:132
Namespace for internal implementation details and low-level types.
Definition peak_common_math.hpp:24
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22