Class Angle

  • All Implemented Interfaces:
    android.os.Parcelable

    public class Angle
    extends Object
    implements android.os.Parcelable
    Representation of an angle. You can create a new angle using degrees with fromDegrees(double) or using radians with fromRadians(double)
    • Field Detail

      • EMPTY

        public static final Angle EMPTY
      • CREATOR

        public static final android.os.Parcelable.Creator<Angle> CREATOR
    • Method Detail

      • fromRadians

        @NonNull
        public static Angle fromRadians​(double radians)
        Parameters:
        radians - angle in radians, increasing in counter-clockwise
      • fromDegrees

        @NonNull
        public static Angle fromDegrees​(double degrees)
        Parameters:
        degrees - angle in degrees, increasing in counter-clockwise
      • radians

        public double radians()
        Returns:
        angle in radians, increasing in counter-clockwise
      • degrees

        public double degrees()
        Returns:
        angle in degrees, increasing in counter-clockwise
      • degreesClockwise

        public double degreesClockwise()
        Returns:
        angle in radians, increasing in clockwise
      • radiansMinusPiPi

        public double radiansMinusPiPi()
        Returns:
        angle in radians in range (-pi,pi)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable