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:
commit
858f68ea58
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue