20 template <NumericType T>
30 const auto midPoint = ((
max -
min) /
static_cast<T
>(2.0)) +
min;
41 template <NumericType T>
52 template <NumericType T>
57 template <NumericType T>
60 .min = other.
min + constant,
61 .max = other.
max + constant
65 template <NumericType T>
68 .min = other.
min - constant,
69 .max = other.
max - constant
73 template <NumericType T>
76 .min = other.
min * constant,
77 .max = other.
max * constant
81 template <NumericType T>
84 .min = other.
min / constant,
85 .max = other.
max / constant
Utility helper functions and classes.
Definition marvin_Utils.h:21
Range< T > operator/(const Range< T > &other, T constant)
Definition marvin_Range.h:82
bool operator!=(const Range< T > &lhs, const Range< T > &rhs)
Definition marvin_Range.h:53
Range< T > operator*(const Range< T > &other, T constant)
Definition marvin_Range.h:74
Range< T > operator-(const Range< T > &other, T constant)
Definition marvin_Range.h:66
Range< T > operator+(const Range< T > &other, T constant)
Definition marvin_Range.h:58
bool operator==(const Range< T > &lhs, const Range< T > &rhs)
Definition marvin_Range.h:42
POD type that represents a range of values, for classes requiring a min and a max.
Definition marvin_Range.h:21
T max
Definition marvin_Range.h:23
T midpoint() const noexcept
Definition marvin_Range.h:29
T min
Definition marvin_Range.h:22