diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-08-16 13:49:37 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:42:07 +0300 |
commit | a164270834a7d3d056f7a237a51da15621b18e07 (patch) | |
tree | 483cc7cb643d0160a31f3e02acf8edb853854609 /map/ruler.cpp | |
parent | 96c0658a68e29d7b6671291c3c28b35dbd7d6086 (diff) |
moved location handling from Framework into location::State and added "follow compass" mode.
Diffstat (limited to 'map/ruler.cpp')
-rw-r--r-- | map/ruler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/map/ruler.cpp b/map/ruler.cpp index 0c78d047b0..17b71bec4c 100644 --- a/map/ruler.cpp +++ b/map/ruler.cpp @@ -227,8 +227,8 @@ void Ruler::update() double a = ang::AngleTo(pt0, pt1); m2::RectD r = MercatorBounds::RectByCenterXYAndSizeInMeters(glbPivot.x, glbPivot.y, - cos(a) * m_metresDiff / 2, - sin(a) * m_metresDiff / 2); + abs(cos(a) * m_metresDiff / 2), + abs(sin(a) * m_metresDiff / 2)); pt0 = m_screen.GtoP(m2::PointD(r.minX(), r.minY())); pt1 = m_screen.GtoP(m2::PointD(r.maxX(), r.maxY())); |