From 351ce32e691a85399983a4655db6c8f72dd480f3 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Fri, 29 Jun 2012 19:57:25 +0200 Subject: refactoring: minor lint cleanups * If you get compile errors, upgrade to ADT 20 and SDK 20 --- main/src/cgeo/geocaching/ui/CompassView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main/src/cgeo/geocaching/ui/CompassView.java') 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); -- cgit v1.1