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
public abstract class Angle extends Object implements DoubleSupplier
Represents the angle concept.
-
-
Field Summary
Fields Modifier and Type Field Description static doublePI_OVER_TWOπ/2.static doubleTWO_PI2π.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Test for equality with another object.doublegetAsDouble()inthashCode()abstract Angle.DegtoDeg()Convert to aAngle.Deg.abstract Angle.RadtoRad()Convert to aAngle.Rad.abstract Angle.TurntoTurn()Convert to aAngle.Turn.
-
-
-
Field Detail
-
TWO_PI
public static final double TWO_PI
2π.- See Also:
- Constant Field Values
-
PI_OVER_TWO
public static final double PI_OVER_TWO
π/2.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAsDouble
public double getAsDouble()
- Specified by:
getAsDoublein interfaceDoubleSupplier- Returns:
- the value.
-
equals
public boolean equals(Object other)
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
public abstract Angle.Turn toTurn()
Convert to aAngle.Turn.- Returns:
- the angle in turns.
-
-