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:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-10-28 16:34:02 +0300
committerLev Dragunov <l.dragunov@corp.mail.ru>2015-10-29 16:01:29 +0300
commit419488cd68eebc821ce7e3300ac042e171abba7b (patch)
treef2400a138bb61e0a7ba24c76a8779ae3effa1dcb /geometry
parentd8de1921c3ffae9cf216a3407ab098a21cdba5a6 (diff)
Review fixes.
Diffstat (limited to 'geometry')
-rw-r--r--geometry/latlon.cpp9
-rw-r--r--geometry/latlon.hpp10
2 files changed, 11 insertions, 8 deletions
diff --git a/geometry/latlon.cpp b/geometry/latlon.cpp
index fb57a27788..eefcd02386 100644
--- a/geometry/latlon.cpp
+++ b/geometry/latlon.cpp
@@ -13,4 +13,13 @@ string DebugPrint(LatLon const & t)
return out.str();
}
+bool LatLon::operator == (ms::LatLon const & p) const
+{
+ return lat == p.lat && lon == p.lon;
+}
+
+bool LatLon::EqualDxDy(LatLon const & p, double eps) const
+{
+ return (my::AlmostEqualAbs(lat, p.lat, eps) && my::AlmostEqualAbs(lon, p.lon, eps));
+}
} // namespace ms
diff --git a/geometry/latlon.hpp b/geometry/latlon.hpp
index 4d5d105c29..4ff650d745 100644
--- a/geometry/latlon.hpp
+++ b/geometry/latlon.hpp
@@ -17,15 +17,9 @@ public:
static LatLon Zero() { return LatLon(0., 0.); }
- bool operator == (ms::LatLon const & p) const
- {
- return lat == p.lat && lon == p.lon;
- }
+ bool operator == (ms::LatLon const & p) const;
- bool EqualDxDy(LatLon const & p, double eps) const
- {
- return ((fabs(lat - p.lat) < eps) && (fabs(lon - p.lon) < eps));
- }
+ bool EqualDxDy(LatLon const & p, double eps) const;
struct Hash
{