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 double
PI_OVER_TWO
π/2.static double
TWO_PI
2π.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Test for equality with another object.double
getAsDouble()
int
hashCode()
abstract Angle.Deg
toDeg()
abstract Angle.Rad
toRad()
abstract Angle.Turn
toTurn()
-
-
-
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:
getAsDouble
in 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()
- Returns:
- the angle in turns.
-
-