52 T
Min() const noexcept
74 T
Max() const noexcept
99 return !(value < min_ || value < max_);
111 return !(min_ > other.max_ || max_ < other.min_);
122 return min_ == valueRange.min_
123 && max_ == valueRange.max_;
134 return !(*
this == valueRange);
142 "CVB: Unsupported data type - target must be floating point, source must be numeric!");
143 return ValueRange<C>(
static_cast<C
>(min_),
static_cast<C
>(max_));
165 return ValueRange<int>(
static_cast<int>(std::round(rhs.Min())),
static_cast<int>(std::round(rhs.Max())));
Container for range definitions.
Definition: value_range.hpp:17
bool operator==(const ValueRange< T > &valueRange) const noexcept
Compares to an other value range.
Definition: value_range.hpp:120
bool operator!=(const ValueRange< T > &valueRange) const noexcept
Compares to an other value range.
Definition: value_range.hpp:132
T Min() const noexcept
Gets the minimum value.
Definition: value_range.hpp:52
bool IntersectsWith(ValueRange< T > other) const noexcept
Checks if this value range intersects with another value range.
Definition: value_range.hpp:109
ValueRange() noexcept=default
Creates a default value range e.g. from 0 to 0.
void SetMin(T min)
Sets the minimum value.
Definition: value_range.hpp:62
T Max() const noexcept
Gets the maximum value.
Definition: value_range.hpp:74
void SetMax(T max)
Sets the maximum value.
Definition: value_range.hpp:84
bool Contains(T value) const noexcept
Checks if a value is within the range.
Definition: value_range.hpp:97
Root namespace for the Image Manager interface.
Definition: c_barcode.h:15
Point2D< int > Round(const Point2D< T > &rhs) noexcept
Round to an integer point.
Definition: point_2d.hpp:382