Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2012-08-16 13:49:37 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:42:07 +0300
commita164270834a7d3d056f7a237a51da15621b18e07 (patch)
tree483cc7cb643d0160a31f3e02acf8edb853854609 /map/ruler.cpp
parent96c0658a68e29d7b6671291c3c28b35dbd7d6086 (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.cpp4
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()));