53 if (almostEqual(start, end))
94 return value >= m_start && value <= m_end;
101 template <typename Q = T, std::enable_if_t<std::is_integral<Q>::value,
int> = 0>
102 static constexpr bool almostEqual(Q v1, Q v2)
107 template <typename Q = T, std::enable_if_t<std::is_floating_point<Q>::value,
int> = 0>
108 static constexpr Q almostEqualMaxHelper(Q v1, Q v2)
110 return std::max<Q>({ 1.0, std::fabs(v1), std::fabs(v2) });
113 template <typename Q = T, std::enable_if_t<std::is_floating_point<Q>::value,
int> = 0>
114 static constexpr bool almostEqual(Q v1, Q v2)
116 return std::fabs(v1 - v2) <= std::numeric_limits<Q>::epsilon() * almostEqualMaxHelper(v1, v2);
constexpr T End() const
Get the end value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:78
constexpr Interval(T start, T end)
Constructor for the interval.
Definition peak_ipl_interval.hpp:45
constexpr T Start() const
Get the start value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:66
constexpr bool InInterval(T value) const
Check if the value is in the interval.
Definition peak_ipl_interval.hpp:92
The exception thrown when passing an invalid parameter to a function.
Definition peak_ipl_exception.hpp:59
Definition peak_ipl_binning.hpp:25
The "peak::ipl" namespace contains the whole image processing library.
Definition peak_ipl_binning.hpp:23
#define PEAK_IPL_NO_DISCARD
Definition peak_ipl_attribute_defines.h:25