diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-09-06 14:04:02 +0200 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-09-12 13:59:11 +0200 |
commit | caebcd08e3803f5758353fbadefc9b75093b4015 (patch) | |
tree | 5189e182b0d11c8271396a73a89ef6a892a3a009 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java | |
parent | d4a2123bec4289848a4a0634d2727e2d4c77f180 (diff) | |
download | qtlocation-mapboxgl-caebcd08e3803f5758353fbadefc9b75093b4015.tar.gz |
[android] LocationComponent - javadoc fixes, improved initialization, removed location save state
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java index aa01c914dd..ff0a9ce193 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/Utils.java @@ -23,20 +23,20 @@ public final class Utils { } /** - * Util for finding the shortest path from the current icon rotated degree to the new degree. + * Util for finding the shortest path from the current rotated degree to the new degree. * - * @param magneticHeading the new position of the rotation - * @param previousMagneticHeading the current position of the rotation + * @param heading the new position of the rotation + * @param previousHeading the current position of the rotation * @return the shortest degree of rotation possible */ - public static float shortestRotation(float magneticHeading, float previousMagneticHeading) { - double diff = previousMagneticHeading - magneticHeading; + public static float shortestRotation(float heading, float previousHeading) { + double diff = previousHeading - heading; if (diff > 180.0f) { - magneticHeading += 360.0f; + heading += 360.0f; } else if (diff < -180.0f) { - magneticHeading -= 360.f; + heading -= 360.f; } - return magneticHeading; + return heading; } static Bitmap getBitmapFromDrawable(Drawable drawable) { |