Package org.apache.commons.numbers.angle
Class Angle
java.lang.Object
org.apache.commons.numbers.angle.Angle
- All Implemented Interfaces:
DoubleSupplier
- Direct Known Subclasses:
Angle.Deg,Angle.Rad,Angle.Turn
Represents the angle concept.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleπ/2.static final double2π. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest for equality with another object.doubleinthashCode()abstract Angle.DegtoDeg()Convert to aAngle.Deg.abstract Angle.RadtoRad()Convert to aAngle.Rad.abstract Angle.TurntoTurn()Convert to aAngle.Turn.
-
Field Details
-
TWO_PI
2π.- See Also:
-
PI_OVER_TWO
π/2.- See Also:
-
-
Method Details
-
getAsDouble
- Specified by:
getAsDoublein interfaceDoubleSupplier- Returns:
- the value.
-
hashCode
-
equals
Test for equality with another object. Objects are considered to be equal if their concrete types are equal and their values are exactly the same (or both areDouble.NaN). -
toTurn
Convert to aAngle.Turn.- Returns:
- the angle in turns.
-
toRad
Convert to aAngle.Rad.- Returns:
- the angle in radians.
-
toDeg
Convert to aAngle.Deg.- Returns:
- the angle in degrees.
-