Package org.apache.commons.numbers.angle
Class Angle.Deg
java.lang.Object
org.apache.commons.numbers.angle.Angle
org.apache.commons.numbers.angle.Angle.Deg
- All Implemented Interfaces:
DoubleSupplier
- Enclosing class:
Angle
Unit: degrees.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.numbers.angle.Angle
Angle.Deg, Angle.Rad, Angle.Turn
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DoubleUnaryOperator
Normalizing operator (result will be within the[0, 360[
interval).static final Angle.Deg
Zero.Fields inherited from class org.apache.commons.numbers.angle.Angle
PI_OVER_TWO, TWO_PI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleUnaryOperator
normalizer
(double lo) Creates an operator for normalizing/reducing an angle.static Angle.Deg
of
(double angle) Create an instance.toDeg()
Convert to aAngle.Deg
.toRad()
Convert to aAngle.Rad
.toTurn()
Convert to aAngle.Turn
.Methods inherited from class org.apache.commons.numbers.angle.Angle
equals, getAsDouble, hashCode
-
Field Details
-
ZERO
Zero. -
WITHIN_0_AND_360
Normalizing operator (result will be within the[0, 360[
interval).
-
-
Constructor Details
-
Deg
private Deg(double angle) Create an instance.- Parameters:
angle
- (in degrees).
-
-
Method Details
-
of
Create an instance.- Parameters:
angle
- (in degrees).- Returns:
- a new instance.
-
toTurn
Convert to aAngle.Turn
. -
toRad
Convert to aAngle.Rad
. -
toDeg
Convert to aAngle.Deg
. -
normalizer
Creates an operator for normalizing/reducing an angle. The output will be within the[c, c + 360[
interval.- Parameters:
lo
- Lower bound of the normalized interval.- Returns:
- the normalization operator.
-