mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +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
@@ -320,7 +320,7 @@ SessionState RoutingSession::OnLocationPositionChanged(GpsInfo const & info)
|
||||
auto const & lastGoodPoint = m_route->GetFollowedPolyline().GetCurrentIter().m_pt;
|
||||
double const dist = mercator::DistanceOnEarth(lastGoodPoint,
|
||||
mercator::FromLatLon(info.m_latitude, info.m_longitude));
|
||||
if (base::AlmostEqualAbs(dist, m_lastDistance, kRunawayDistanceSensitivityMeters))
|
||||
if (AlmostEqualAbs(dist, m_lastDistance, kRunawayDistanceSensitivityMeters))
|
||||
return m_state;
|
||||
|
||||
if (!info.HasSpeed() || info.m_speed < m_routingSettings.m_minSpeedForRouteRebuildMpS)
|
||||
@@ -563,7 +563,7 @@ void RoutingSession::MatchLocationToRoadGraph(location::GpsInfo & location)
|
||||
m2::PointD const direction = m_positionAccumulator.GetDirection();
|
||||
|
||||
static auto constexpr kEps = 1e-5;
|
||||
if (base::AlmostEqualAbs(direction, m2::PointD::Zero(), kEps))
|
||||
if (AlmostEqualAbs(direction, m2::PointD::Zero(), kEps))
|
||||
return;
|
||||
|
||||
EdgeProj proj;
|
||||
@@ -585,10 +585,10 @@ void RoutingSession::MatchLocationToRoadGraph(location::GpsInfo & location)
|
||||
{
|
||||
if (m_route->GetCurrentRoutingSettings().m_matchRoute)
|
||||
{
|
||||
if (!base::AlmostEqualAbs(m_proj.m_point, proj.m_point, kEps))
|
||||
if (!AlmostEqualAbs(m_proj.m_point, proj.m_point, kEps))
|
||||
{
|
||||
location.m_bearing =
|
||||
location::AngleToBearing(base::RadToDeg(ang::AngleTo(m_proj.m_point, proj.m_point)));
|
||||
location::AngleToBearing(math::RadToDeg(ang::AngleTo(m_proj.m_point, proj.m_point)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user