mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -12,8 +12,8 @@ namespace polyline_tests
|
||||
{
|
||||
double constexpr kEps = 1e-5;
|
||||
|
||||
void TestClosest(std::vector<m2::PointD> const & points, m2::PointD const & point,
|
||||
double expectedSquaredDist, uint32_t expectedIndex)
|
||||
void TestClosest(std::vector<m2::PointD> const & points, m2::PointD const & point, double expectedSquaredDist,
|
||||
uint32_t expectedIndex)
|
||||
{
|
||||
auto const closestByPoints = m2::CalcMinSquaredDistance(points.begin(), points.end(), point);
|
||||
TEST_ALMOST_EQUAL_ABS(closestByPoints.first, expectedSquaredDist, kEps, ());
|
||||
@@ -44,8 +44,7 @@ UNIT_TEST(Rect_PolylineMinDistanceTest)
|
||||
// 1 | |
|
||||
// | |
|
||||
// 0----1----2----3
|
||||
std::vector<m2::PointD> const poly = {{0.0, 1.0}, {0.0, 0.0}, {1.0, 0.0},
|
||||
{2.0, 0.0}, {3.0, 0.0}, {3.0, 1.0}};
|
||||
std::vector<m2::PointD> const poly = {{0.0, 1.0}, {0.0, 0.0}, {1.0, 0.0}, {2.0, 0.0}, {3.0, 0.0}, {3.0, 1.0}};
|
||||
|
||||
TestClosest(poly, m2::PointD(0.0, 1.0), 0.0 /* expectedSquaredDist */, 0 /* expectedIndex */);
|
||||
TestClosest(poly, m2::PointD(0.0, 0.0), 0.0 /* expectedSquaredDist */, 0 /* expectedIndex */);
|
||||
|
||||
Reference in New Issue
Block a user