50 T
Min() const noexcept
72 T
Max() const noexcept
97 return !(value < min_ || value < max_);
109 return !(min_ > other.max_ || max_ < other.min_);
120 return min_ == valueRange.min_
121 && max_ == valueRange.max_;
132 return !(*
this == valueRange);
140 "CVB: Unsupported data type - target must be floating point, source must be numeric!");
141 return ValueRange<C>(
static_cast<C
>(min_),
static_cast<C
>(max_));
163 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:118
bool operator!=(const ValueRange< T > &valueRange) const noexcept
Compares to an other value range.
Definition: value_range.hpp:130
T Min() const noexcept
Gets the minimum value.
Definition: value_range.hpp:50
bool IntersectsWith(ValueRange< T > other) const noexcept
Checks if this value range intersects with another value range.
Definition: value_range.hpp:107
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:60
T Max() const noexcept
Gets the maximum value.
Definition: value_range.hpp:72
void SetMax(T max)
Sets the maximum value.
Definition: value_range.hpp:82
bool Contains(T value) const noexcept
Checks if a value is within the range.
Definition: value_range.hpp:95
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:380