Package com.luciad.cartesian
Class Azimuth
java.lang.Object
com.luciad.cartesian.Azimuth
An azimuth: degrees, clockwise from north/up/Y-axis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AzimuthfromRadians(double radians) Creates an Azimuth from an azimuth value in radians.doubleReturns the value in degrees.doubleReturns the value in radians.inthashCode()Subtracts another Azimuth from the Azimuth and normalizes the result between 0 and 360 degrees.Adds the azimuth to another azimuth and normalizes the result between 0 and 360 degrees.toAngle()Converts the Azimuth to an Angle.
-
Constructor Details
-
Azimuth
Create anAzimuthbased on the given azimuth value in degrees.- Parameters:
degrees- an angle in degree- Throws:
IllegalArgumentException- when degrees is NaN or infinite.
-
Azimuth
Creates an azimuth based on an angle, expressed in degrees.- Parameters:
azimuth- the azimuth value.
-
-
Method Details
-
fromRadians
Creates an Azimuth from an azimuth value in radians.- Parameters:
radians- an azimuth in radians- Returns:
- a new
Azimuthbased 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
Converts the Azimuth to an Angle.- Returns:
- the result of the convertion.
-
plus
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
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
-
hashCode
public int hashCode()
-