aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui/CompassView.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-06-29 19:57:25 +0200
committerBananeweizen <bananeweizen@gmx.de>2012-06-29 19:57:25 +0200
commit351ce32e691a85399983a4655db6c8f72dd480f3 (patch)
tree1b17d870335e8ae7166807483f0d52984b0f73b4 /main/src/cgeo/geocaching/ui/CompassView.java
parentddfb74868f73710d7d7fa05d311af1981bc30f13 (diff)
downloadcgeo-351ce32e691a85399983a4655db6c8f72dd480f3.zip
cgeo-351ce32e691a85399983a4655db6c8f72dd480f3.tar.gz
cgeo-351ce32e691a85399983a4655db6c8f72dd480f3.tar.bz2
refactoring: minor lint cleanups
* If you get compile errors, upgrade to ADT 20 and SDK 20
Diffstat (limited to 'main/src/cgeo/geocaching/ui/CompassView.java')
-rw-r--r--main/src/cgeo/geocaching/ui/CompassView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/CompassView.java b/main/src/cgeo/geocaching/ui/CompassView.java
index 71ffd52..048e280 100644
--- a/main/src/cgeo/geocaching/ui/CompassView.java
+++ b/main/src/cgeo/geocaching/ui/CompassView.java
@@ -11,6 +11,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PaintFlagsDrawFilter;
import android.util.AttributeSet;
+import android.util.FloatMath;
import android.view.View;
public class CompassView extends View {
@@ -136,9 +137,9 @@ public class CompassView extends View {
// If the difference is smaller than 1 degree, do nothing as it
// causes the arrow to vibrate. Round away from 0.
if (diff > 1.0) {
- offset = (float) Math.ceil(diff / 10.0); // for larger angles, rotate faster
+ offset = FloatMath.ceil(diff / 10.0f); // for larger angles, rotate faster
} else if (diff < 1.0) {
- offset = (float) Math.floor(diff / 10.0);
+ offset = FloatMath.floor(diff / 10.0f);
}
return AngleUtils.normalize(actual + offset);