Files
comaps/libs/geometry/geometry_tests/latlon_test.cpp
Konstantin Pastbin bfffa1fff4 Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2025-08-17 14:32:37 +07:00

14 lines
440 B
C++

#include "geometry/latlon.hpp"
#include "geometry/mercator.hpp"
#include "geometry/point2d.hpp"
#include "testing/testing.hpp"
UNIT_TEST(LatLonPointConstructorTest)
{
m2::PointD basePoint(39.123, 42.456);
ms::LatLon wgsPoint = mercator::ToLatLon(basePoint);
m2::PointD resultPoint = mercator::FromLatLon(wgsPoint);
TEST_ALMOST_EQUAL_ULPS(basePoint.x, resultPoint.x, ());
TEST_ALMOST_EQUAL_ULPS(basePoint.y, resultPoint.y, ());
}