Package org.spongepowered.api.util
Class Angle
java.lang.Object
org.spongepowered.api.util.Angle
Represents an angle in the range of 0 (inclusive) to 360 (exclusive) degrees.
-
Method Summary
Modifier and TypeMethodDescriptiondoubledegrees()Gets this angle in degrees.booleanstatic AnglefromDegrees(double degrees) Creates anAnglebased on the provided angle in degrees.static AnglefromRadians(double radians) Creates anAnglebased on the provided angle in degrees.inthashCode()doubleradians()Gets this angle in radians.
-
Method Details
-
fromDegrees
Creates anAnglebased on the provided angle in degrees.Any angle that falls outside of the range 0 (inclusive) to 360 (exclusive) degrees will be mapped to be within this range.
- Parameters:
degrees- The angle in degrees.- Returns:
- The
Angle
-
fromRadians
Creates anAnglebased on the provided angle in degrees.Any angle that falls outside of the range 0 (inclusive) to 2*pi (exclusive) degrees will be mapped to be within this range.
- Parameters:
radians- The angle in radians.- Returns:
- The
Angle
-
degrees
public double degrees()Gets this angle in degrees.- Returns:
- The angle in degrees.
-
radians
public double radians()Gets this angle in radians.- Returns:
- The angle in radians.
-
equals
-
hashCode
public int hashCode()
-