mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
ADL for AlmostEqual* and use math:: instead of base:: (#9634)
* ADL for AlmostEqual* and use math:: instead of base:: Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
82133c5743
commit
30718e106e
@@ -150,7 +150,7 @@ bool RestrictionCollector::FeatureHasPointWithCoords(uint32_t featureId,
|
||||
for (uint32_t i = 0; i < pointsCount; ++i)
|
||||
{
|
||||
static double constexpr kEps = 1e-5;
|
||||
if (base::AlmostEqualAbs(mercator::FromLatLon(roadGeometry.GetPoint(i)), coords, kEps))
|
||||
if (AlmostEqualAbs(mercator::FromLatLon(roadGeometry.GetPoint(i)), coords, kEps))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -246,9 +246,9 @@ bool RestrictionCollector::CheckAndProcessUTurn(Restriction::Type & restrictionT
|
||||
// https://wiki.openstreetmap.org/wiki/Relation:restriction
|
||||
static auto constexpr kEps = 1e-5;
|
||||
bool const viaIsFirstNode =
|
||||
base::AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(0)), kEps);
|
||||
AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(0)), kEps);
|
||||
bool const viaIsLastNode =
|
||||
base::AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(n - 1)), kEps);
|
||||
AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(n - 1)), kEps);
|
||||
|
||||
if (viaIsFirstNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user