isEmpty added

This commit is contained in:
Uwe Rathmann 2021-05-26 13:07:23 +02:00
parent d07e5fcf3f
commit 4d888f7a4d
1 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,7 @@ class QSK_EXPORT QskIntervalF
constexpr bool isValid() const noexcept;
constexpr bool isNull() const noexcept;
constexpr bool isEmpty() const noexcept;
void invalidate() noexcept;
@ -149,6 +150,11 @@ inline constexpr bool QskIntervalF::isNull() const noexcept
return m_lowerBound == m_upperBound;
}
inline constexpr bool QskIntervalF::isEmpty() const noexcept
{
return m_upperBound <= m_lowerBound;
}
inline void QskIntervalF::invalidate() noexcept
{
m_lowerBound = 0.0;