diff options
| author | bananeweizen <bananeweizen@gmx.de> | 2011-08-12 21:42:45 +0200 |
|---|---|---|
| committer | bananeweizen <bananeweizen@gmx.de> | 2011-08-12 21:42:45 +0200 |
| commit | 651126c35e521b6c5247e8a8e0edc6f26f6daa5e (patch) | |
| tree | da2a2c4d79f55969821153382fff208c1235efbd /src/cgeo/geocaching/cgBase.java | |
| parent | 082ff7a2e80734704ba72ca366dfcab9395bca13 (diff) | |
| download | cgeo-651126c35e521b6c5247e8a8e0edc6f26f6daa5e.zip cgeo-651126c35e521b6c5247e8a8e0edc6f26f6daa5e.tar.gz cgeo-651126c35e521b6c5247e8a8e0edc6f26f6daa5e.tar.bz2 | |
code cleanup, fixed static code analysis bugs
Diffstat (limited to 'src/cgeo/geocaching/cgBase.java')
| -rw-r--r-- | src/cgeo/geocaching/cgBase.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cgeo/geocaching/cgBase.java b/src/cgeo/geocaching/cgBase.java index 3e1f67b..0450a56 100644 --- a/src/cgeo/geocaching/cgBase.java +++ b/src/cgeo/geocaching/cgBase.java @@ -2782,8 +2782,8 @@ public class cgBase { unit = "mph"; } - if (kph < 10) { - return String.format(Locale.getDefault(), "%.1f", Double.valueOf((Math.round(kph * 10) / 10))) + " " + unit; + if (kph < 10.0) { + return String.format(Locale.getDefault(), "%.1f", Double.valueOf((Math.round(kph * 10.0) / 10.0))) + " " + unit; } else { return String.format(Locale.getDefault(), "%.0f", Double.valueOf(Math.round(kph))) + " " + unit; } |
