Always show rounded current speed

Signed-off-by: TobiPeterG <tobi.goergens@gmail.com>
This commit is contained in:
TobiPeterG 2024-09-22 14:02:27 +02:00 committed by Viktor Havaka
parent 80add2247f
commit df258d545f

View file

@ -202,7 +202,8 @@ double MpsToUnits(double metersPerSecond, Units units)
std::string FormatSpeedNumeric(double metersPerSecond, Units units)
{
double const unitsPerHour = MpsToUnits(metersPerSecond, units);
return ToStringPrecision(unitsPerHour, unitsPerHour >= 10.0 ? 0 : 1);
double roundedValue = std::round(unitsPerHour);
return std::to_string(static_cast<int>(roundedValue));
}
std::string FormatOsmLink(double lat, double lon, int zoom)