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:
Alexander Borsuk
2025-07-07 20:49:00 +02:00
committed by Konstantin Pastbin
parent 82133c5743
commit 30718e106e
175 changed files with 542 additions and 559 deletions

View File

@@ -113,7 +113,7 @@ std::string FormatLatLonAsDMSImpl(double value, char positive, char negative, in
// Seconds
d = d * 60.0;
if (dac == 0)
d = SignedRound(d);
d = math::SignedRound(d);
d = std::modf(d, &i);
sstream << std::setw(2) << i;
@@ -124,7 +124,7 @@ std::string FormatLatLonAsDMSImpl(double value, char positive, char negative, in
sstream << "";
// This condition is too heavy for production purposes (but more correct).
//if (base::SignedRound(value * 3600.0 * pow(10, dac)) != 0)
//if (math::SignedRound(value * 3600.0 * pow(10, dac)) != 0)
if (!AlmostEqualULPs(value, 0.0))
{
char postfix = positive;
@@ -228,7 +228,7 @@ std::string FormatOsmLink(double lat, double lon, int zoom)
for (int i = 0; i < (zoom + 8) % 3; ++i)
osmUrl += "-";
// ?m tells OSM to display a marker
// ?m tells OSM to display a marker
return osmUrl + "?m";
}