diff options
author | vng <viktor.govako@gmail.com> | 2012-02-24 19:31:49 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:34:31 +0300 |
commit | 4da36fc55a0f962e0afc93e20f4c829685f9ee40 (patch) | |
tree | 4d26e198cbf9721d7d80dd1e30d8db87ed5f7757 | |
parent | b6075360deb86d444c0df453389414eaee39f9fe (diff) |
Remove dummy Rect::Move, add Rect::SetCenter.
-rw-r--r-- | geometry/rect2d.hpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/geometry/rect2d.hpp b/geometry/rect2d.hpp index 0e4f5e09f2..6f843f985e 100644 --- a/geometry/rect2d.hpp +++ b/geometry/rect2d.hpp @@ -176,6 +176,11 @@ namespace m2 m_maxY = c.y + dy; } + void SetCenter(m2::Point<T> const & p) + { + Offset(p - Center()); + } + T minX() const { return m_minX; } T minY() const { return m_minY; } T maxX() const { return m_maxX; } @@ -186,14 +191,6 @@ namespace m2 void setMaxX(T maxX) { m_maxX = maxX; } void setMaxY(T maxY) { m_maxY = maxY; } - void Move(Point<T> const & d) - { - m_minX += d.x; - m_minY += d.y; - m_maxX += d.x; - m_maxY += d.y; - } - void Scale(T scale) { scale *= 0.5; |