Merge pull request #38 from rogere66/master

Use full 3 digit resolution in distance display - very useful for off-road navigation.
This commit is contained in:
Victor 2011-08-24 12:50:06 -07:00
commit 858f68ea58

View file

@ -63,9 +63,9 @@ public class OsmAndFormatter {
if (meters >= 100 * mainUnitInMeters) {
return (int) (meters / mainUnitInMeters) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
} else if (meters > 1.5f * mainUnitInMeters) {
} else if (meters > 9.99f * mainUnitInMeters) {
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
} else if (meters > 0.9f * mainUnitInMeters) {
} else if (meters > 0.999f * mainUnitInMeters) {
return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
} else {
if (mc == MetricsConstants.KILOMETERS_AND_METERS) {