mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 05:43:37 +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
@@ -289,7 +289,7 @@ drape_ptr<df::Subroute> CreateDrapeSubroute(vector<RouteSegment> const & segment
|
||||
// To prevent visual artefacts, in the case when all head segments are real
|
||||
// m_headFakeDistance must be less than 0.0.
|
||||
auto const headLen = (firstReal > 0) ? segments[firstReal - 1].GetDistFromBeginningMerc() - baseDistance : 0.0;
|
||||
if (base::AlmostEqualAbs(headLen, 0.0, kEps))
|
||||
if (AlmostEqualAbs(headLen, 0.0, kEps))
|
||||
subroute->m_headFakeDistance = -kBias;
|
||||
else
|
||||
subroute->m_headFakeDistance = headLen;
|
||||
@@ -298,7 +298,7 @@ drape_ptr<df::Subroute> CreateDrapeSubroute(vector<RouteSegment> const & segment
|
||||
// m_tailFakeDistance must be greater than the length of the subroute.
|
||||
auto const subrouteLen = segments.back().GetDistFromBeginningMerc() - baseDistance;
|
||||
auto const tailLen = segments[lastReal].GetDistFromBeginningMerc() - baseDistance;
|
||||
if (base::AlmostEqualAbs(tailLen, subrouteLen, kEps))
|
||||
if (AlmostEqualAbs(tailLen, subrouteLen, kEps))
|
||||
subroute->m_tailFakeDistance = subrouteLen + kBias;
|
||||
else
|
||||
subroute->m_tailFakeDistance = tailLen;
|
||||
@@ -1275,7 +1275,7 @@ void RoutingManager::DistanceAltitude::Simplify(double altitudeDeviation)
|
||||
// eps, distFn, AccumulateSkipSmallTrg(distFn, out, eps));
|
||||
|
||||
// 2. Default square distance from segment.
|
||||
SimplifyDefault(IterT(*this, true), IterT(*this, false), base::Pow2(altitudeDeviation), out);
|
||||
SimplifyDefault(IterT(*this, true), IterT(*this, false), math::Pow2(altitudeDeviation), out);
|
||||
|
||||
size_t const count = out.size();
|
||||
m_distances.resize(count);
|
||||
|
||||
Reference in New Issue
Block a user