/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
android-google-915
geometry/latlon.cpp
29 строк
662 B
Maxim Pimenov
[base] Replaced the namespace my with base.
18 сен 2018, 14:46
18 сен 2018, 14:46
412387c
Код
Авторство
О чём код?
#include "latlon.hpp" #include <sstream> using namespace std; namespace ms { // static double const LatLon::kMinLat = -90; double const LatLon::kMaxLat = 90; double const LatLon::kMinLon = -180; double const LatLon::kMaxLon = 180; string DebugPrint(LatLon const & t) { ostringstream out; out.precision(20); out << "ms::LatLon(" << t.lat << ", " << t.lon << ")"; 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 (base::AlmostEqualAbs(lat, p.lat, eps) && base::AlmostEqualAbs(lon, p.lon, eps)); } } // namespace ms