Package org.apache.commons.numbers.angle
Class Angle.Turn
java.lang.Object
org.apache.commons.numbers.angle.Angle
org.apache.commons.numbers.angle.Angle.Turn
- All Implemented Interfaces:
DoubleSupplier
- Enclosing class:
Angle
Unit: turns.
-
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, 1[
interval).static final Angle.Turn
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.Turn
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_1
Normalizing operator (result will be within the[0, 1[
interval).
-
-
Constructor Details
-
Turn
private Turn(double angle) Create an instance.- Parameters:
angle
- (in turns).
-
-
Method Details
-
of
Create an instance.- Parameters:
angle
- (in turns).- 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[lo, lo + 1[
interval.- Parameters:
lo
- Lower bound of the normalized interval.- Returns:
- the normalization operator.
-