finishes translation

This commit is contained in:
Christian Beutel
2024-11-05 01:23:06 +01:00
parent 87eb879c7f
commit 81d309c582
9 changed files with 28 additions and 18 deletions

View File

@@ -58,9 +58,9 @@ export function formatSpeed(speed?: number) {
const unit = get(page).data.settings?.unit ?? "metric";
if (unit == "metric") {
return `${Math.round(speed)} km/h`
return `${(speed * 3.6).toFixed(2)} km/h`
} else {
const mph = speed * 0.621371;
const mph = speed * 3.6 * 0.621371;
return `${Math.round(mph)} mp/h`;
}