Incorrect calculation of average travel speed (likely a copy paste)

parent b54c828c
......@@ -45,11 +45,11 @@ class UnitCalculator {
}
averageSpeedMphPretty(double distanceKilometers, int minutes) {
return format0((toMiles(distanceKilometers) * 100) / minutes);
return format0((toMiles(distanceKilometers) / minutes) * 60);
}
averageSpeedKmhPretty(double distanceKilometers, int minutes) {
return format0((distanceKilometers * 100) / minutes);
return format0((distanceKilometers / minutes) * 60);
}
toMiles(double distanceKilometers) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment