Package org.apache.commons.numbers.angle
Class Angle.Rad
java.lang.Object
org.apache.commons.numbers.angle.Angle
org.apache.commons.numbers.angle.Angle.Rad
- All Implemented Interfaces:
DoubleSupplier
- Enclosing class:
Angle
Unit: radians.
-
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 Angle.Radπ.static final Angle.Rad2π.static final DoubleUnaryOperatorNormalizing operator (result will be within the[0, 2π[interval).static final DoubleUnaryOperatorNormalizing operator (result will be within the[-π, π[interval).static final Angle.RadZero.Fields inherited from class org.apache.commons.numbers.angle.Angle
PI_OVER_TWO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleUnaryOperatornormalizer(double lo) Creates an operator for normalizing/reducing an angle.static Angle.Radof(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. -
PI
π. -
TWO_PI
2π. -
WITHIN_0_AND_2PI
Normalizing operator (result will be within the[0, 2π[interval). -
WITHIN_MINUS_PI_AND_PI
Normalizing operator (result will be within the[-π, π[interval).
-
-
Constructor Details
-
Rad
private Rad(double angle) Create an instance.- Parameters:
angle- (in radians).
-
-
Method Details
-
of
Create an instance.- Parameters:
angle- (in radians).- 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 + 2π[interval.- Parameters:
lo- Lower bound of the normalized interval.- Returns:
- the normalization operator.
-