mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +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
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user