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.
  • Field Details

    • ZERO

      public static final Angle.Rad ZERO
      Zero.
    • PI

      public static final Angle.Rad PI
      π.
    • TWO_PI

      public static final Angle.Rad TWO_PI
      2π.
    • 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).
  • Constructor Details

    • Rad

      private Rad(double angle)
      Create an instance.
      Parameters:
      angle - (in radians).
  • Method Details

    • of

      public static Angle.Rad of(double angle)
      Create an instance.
      Parameters:
      angle - (in radians).
      Returns:
      a new instance.
    • toTurn

      public Angle.Turn toTurn()
      Convert to a Angle.Turn.
      Specified by:
      toTurn in class Angle
      Returns:
      the angle in turns.
    • toRad

      public Angle.Rad toRad()
      Convert to a Angle.Rad.
      Specified by:
      toRad in class Angle
      Returns:
      the angle in radians.
    • toDeg

      public Angle.Deg toDeg()
      Convert to a Angle.Deg.
      Specified by:
      toDeg in class Angle
      Returns:
      the angle in degrees.
    • 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.