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:
authorArsentiy Milchakov <milcars@mapswithme.com>2017-07-20 13:26:37 +0300
committerIlya Grechuhin <i.grechuhin@gmail.com>2017-07-21 13:06:50 +0300
commitecf313d3f6cb55af826d57b6afb7726384b4a4ed (patch)
tree1ca66a850f12529e3a38ead1fc96377f4133eb26 /geometry
parent31f17b1b0b603cf63ea3f5d3b101ba1f321536fa (diff)
[partners_api] cian changes
Diffstat (limited to 'geometry')
-rw-r--r--geometry/mercator.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/geometry/mercator.hpp b/geometry/mercator.hpp
index 95b04c6f40..3f860ce7ac 100644
--- a/geometry/mercator.hpp
+++ b/geometry/mercator.hpp
@@ -123,6 +123,12 @@ struct MercatorBounds
FromLatLon(latLonRect.maxY(), latLonRect.maxX()));
}
+ inline static m2::RectD ToLatLonRect(m2::RectD const & mercatorRect)
+ {
+ return m2::RectD(MercatorBounds::YToLat(mercatorRect.minY()), MercatorBounds::XToLon(mercatorRect.minX()),
+ MercatorBounds::YToLat(mercatorRect.maxY()), MercatorBounds::XToLon(mercatorRect.maxX()));
+ }
+
/// Calculates distance on Earth by two points in mercator
static double DistanceOnEarth(m2::PointD const & p1, m2::PointD const & p2);