Class Azimuth

java.lang.Object
com.luciad.cartesian.Azimuth

public final class Azimuth extends Object
An azimuth: degrees, clockwise from north/up/Y-axis.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Azimuth(double degrees)
    Create an Azimuth based on the given azimuth value in degrees.
    Azimuth(Azimuth azimuth)
    Creates an azimuth based on an angle, expressed in degrees.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    static Azimuth
    fromRadians(double radians)
    Creates an Azimuth from an azimuth value in radians.
    double
    Returns the value in degrees.
    double
    Returns the value in radians.
    int
     
    minus(Azimuth other)
    Subtracts another Azimuth from the Azimuth and normalizes the result between 0 and 360 degrees.
    plus(Azimuth other)
    Adds the azimuth to another azimuth and normalizes the result between 0 and 360 degrees.
    Converts the Azimuth to an Angle.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Azimuth

      public Azimuth(double degrees) throws IllegalArgumentException
      Create an Azimuth based on the given azimuth value in degrees.
      Parameters:
      degrees - an angle in degree
      Throws:
      IllegalArgumentException - when degrees is NaN or infinite.
    • Azimuth

      public Azimuth(@NotNull Azimuth azimuth)
      Creates an azimuth based on an angle, expressed in degrees.
      Parameters:
      azimuth - the azimuth value.
  • Method Details

    • fromRadians

      @NotNull public static Azimuth fromRadians(double radians) throws IllegalArgumentException
      Creates an Azimuth from an azimuth value in radians.
      Parameters:
      radians - an azimuth in radians
      Returns:
      a new Azimuth based on the given azimuth in radians
      Throws:
      IllegalArgumentException - when radians is NaN or infinite.
    • getDegrees

      public double getDegrees()
      Returns the value in degrees.
      Returns:
      the value in degrees.
    • getRadians

      public double getRadians()
      Returns the value in radians.
      Returns:
      the value in radians.
    • toAngle

      @NotNull public Angle toAngle()
      Converts the Azimuth to an Angle.
      Returns:
      the result of the convertion.
    • plus

      @NotNull public Azimuth plus(@NotNull Azimuth other)
      Adds the azimuth to another azimuth and normalizes the result between 0 and 360 degrees.
      Parameters:
      other - the other Azimuth.
      Returns:
      the sum of the two Azimuths.
    • minus

      @NotNull public Azimuth minus(@NotNull Azimuth other)
      Subtracts another Azimuth from the Azimuth and normalizes the result between 0 and 360 degrees.
      Parameters:
      other - the other Azimuth.
      Returns:
      the result of the subtraction.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object