This commit is contained in:
Hardy 2016-03-09 09:12:40 -08:00
parent 5650961d75
commit 5c979cfdb8

View file

@ -67,12 +67,11 @@ public class OsmAndFormatter {
}
}
//Miles exceptions: 2000ft->0.5mi, 1000yd->0.5mi, 500yd->0.25mi
if (mc == MetricsConstants.MILES_AND_FOOTS && point == 1 / metersInSecondUnit && roundDist == 2000 / FOOTS_IN_ONE_METER) {
if (mc == MetricsConstants.MILES_AND_FOOTS && roundDist == 2000 / FOOTS_IN_ONE_METER) {
roundDist = 0.5f * METERS_IN_ONE_MILE;
} else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 1000 / YARDS_IN_ONE_METER) {
} else if (mc == MetricsConstants.MILES_AND_YARDS && roundDist == 1000 / YARDS_IN_ONE_METER) {
roundDist = 0.5f * METERS_IN_ONE_MILE;
} else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 500 / YARDS_IN_ONE_METER) {
} else if (mc == MetricsConstants.MILES_AND_YARDS && roundDist == 500 / YARDS_IN_ONE_METER) {
roundDist = 0.25f * METERS_IN_ONE_MILE;
}
return roundDist;