Class Utils

java.lang.Object
com.trimblemaps.mapsdk.location.Utils

public final class Utils extends Object
  • Method Details

    • shortestRotation

      public static float shortestRotation(float heading, float previousHeading)
      Util for finding the shortest path from the current rotated degree to the new degree.
      Parameters:
      heading - the new position of the rotation
      previousHeading - the current position of the rotation
      Returns:
      the shortest degree of rotation possible
    • normalize

      public static float normalize(float angle)
      Normalizes an angle to be in the [0, 360] range.
      Parameters:
      angle - the provided angle
      Returns:
      the normalized angle