Bugfix: ChartFragment needs to show elevation in M/FT.

This commit is contained in:
Dennis Guse
2021-04-30 22:17:04 +02:00
parent 6723bfb979
commit 1baf652b81
6 changed files with 10 additions and 22 deletions
@@ -98,24 +98,12 @@ public class Distance {
return toKM() * UnitConversions.KM_TO_MI;
}
public double to(boolean metricUnit) {
return to(metricUnit ? Unit.KM : Unit.MILES);
public double toKM_Miles(boolean metricUnit) {
return metricUnit ? toKM() : toMI();
}
public double to(Unit unit) {
switch (unit) {
case KM:
return toKM();
case MILES:
return toMI();
default:
throw new RuntimeException("Not implemented");
}
}
public enum Unit {
KM,
MILES
public double toM_FT(boolean metricUnit) {
return metricUnit ? toM() : toFT();
}
@Override