diff options
Diffstat (limited to 'geometry')
-rw-r--r-- | geometry/rect2d.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/geometry/rect2d.hpp b/geometry/rect2d.hpp index 3f94f94207..0e4f5e09f2 100644 --- a/geometry/rect2d.hpp +++ b/geometry/rect2d.hpp @@ -82,6 +82,11 @@ namespace m2 m_maxX = m_maxY = impl::min_max_value<T, IsSigned>().get_max(); } + bool IsValid() const + { + return (m_minX <= m_maxX && m_minY <= m_maxY); + } + void Add(m2::Point<T> const & p) { m_minX = min(p.x, m_minX); |