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
public static final class Angle.Turn extends 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
Fields Modifier and Type Field Description static DoubleUnaryOperator
WITHIN_0_AND_1
Normalizing operator (result will be within the[0, 1[
interval).static Angle.Turn
ZERO
Zero.-
Fields inherited from class org.apache.commons.numbers.angle.Angle
PI_OVER_TWO, TWO_PI
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DoubleUnaryOperator
normalizer(double lo)
Creates an operator for normalizing/reducing an angle.static Angle.Turn
of(double angle)
Create an instance.Angle.Deg
toDeg()
Convert to aAngle.Deg
.Angle.Rad
toRad()
Convert to aAngle.Rad
.Angle.Turn
toTurn()
Convert to aAngle.Turn
.-
Methods inherited from class org.apache.commons.numbers.angle.Angle
equals, getAsDouble, hashCode
-
-
-
-
Field Detail
-
ZERO
public static final Angle.Turn ZERO
Zero.
-
WITHIN_0_AND_1
public static final DoubleUnaryOperator WITHIN_0_AND_1
Normalizing operator (result will be within the[0, 1[
interval).
-
-
Method Detail
-
of
public static Angle.Turn of(double angle)
Create an instance.- Parameters:
angle
- (in turns).- Returns:
- a new instance.
-
toTurn
public Angle.Turn toTurn()
Convert to aAngle.Turn
.
-
normalizer
public static DoubleUnaryOperator normalizer(double lo)
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.
-
-