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
public static final class Angle.Rad extends 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
Fields Modifier and Type Field Description static Angle.Rad
PI
π.static Angle.Rad
TWO_PI
2π.static DoubleUnaryOperator
WITHIN_0_AND_2PI
Normalizing operator (result will be within the[0, 2π[
interval).static DoubleUnaryOperator
WITHIN_MINUS_PI_AND_PI
Normalizing operator (result will be within the[-π, π[
interval).static Angle.Rad
ZERO
Zero.-
Fields inherited from class org.apache.commons.numbers.angle.Angle
PI_OVER_TWO
-
-
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.Rad
of(double angle)
Angle.Deg
toDeg()
Angle.Rad
toRad()
Angle.Turn
toTurn()
-
Methods inherited from class org.apache.commons.numbers.angle.Angle
equals, getAsDouble, hashCode
-
-
-
-
Field Detail
-
WITHIN_0_AND_2PI
public static final DoubleUnaryOperator WITHIN_0_AND_2PI
Normalizing operator (result will be within the[0, 2π[
interval).
-
WITHIN_MINUS_PI_AND_PI
public static final DoubleUnaryOperator WITHIN_MINUS_PI_AND_PI
Normalizing operator (result will be within the[-π, π[
interval).
-
-
Method Detail
-
of
public static Angle.Rad of(double angle)
- Parameters:
angle
- (in radians).- Returns:
- a new intance.
-
toTurn
public Angle.Turn toTurn()
-
normalizer
public static DoubleUnaryOperator normalizer(double lo)
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.
-
-