/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
ios-release-9110
geometry/latlon.cpp
31 строка
924 B
Vladimir Byko-Ianko
[geometry] LatLon refactoring.
19 июл 2019, 13:26
19 июл 2019, 13:26
09b06b0
Код
Авторство
О чём код?
#include "latlon.hpp" #include <sstream> namespace ms { // static double const LatLon::kMinLat = -90.0; double const LatLon::kMaxLat = 90.0; double const LatLon::kMinLon = -180.0; double const LatLon::kMaxLon = 180.0; // Note. LatLon(-180.0, -180.0) are an invalid coordinates which are used in statistics. // So if you want to change the value you should change the code of processing the statistics. LatLon const LatLon::kInvalidValue = LatLon(-180.0, -180.0); bool LatLon::operator==(ms::LatLon const & p) const { return m_lat == p.m_lat && m_lon == p.m_lon; } bool LatLon::EqualDxDy(LatLon const & p, double eps) const { return (base::AlmostEqualAbs(m_lat, p.m_lat, eps) && base::AlmostEqualAbs(m_lon, p.m_lon, eps)); } std::string DebugPrint(LatLon const & t) { std::ostringstream out; out.precision(20); out << "ms::LatLon(" << t.m_lat << ", " << t.m_lon << ")"; return out.str(); } } // namespace ms