Class Angle.Normalizer

java.lang.Object
org.apache.commons.numbers.angle.Angle.Normalizer
All Implemented Interfaces:
DoubleUnaryOperator
Enclosing class:
Angle

private static final class Angle.Normalizer extends Object implements DoubleUnaryOperator
Normalizes an angle around a center value.
  • Field Details

    • lo

      private final double lo
      Lower bound.
    • hi

      private final double hi
      Upper bound.
    • period

      private final double period
      Period.
    • reduce

      private final Reduce reduce
      Normalizer.
  • Constructor Details

    • Normalizer

      Normalizer(double lo, double period)
      Note: It is assumed that both arguments have the same unit.
      Parameters:
      lo - Lower bound of the desired interval.
      period - Circonference of the circle.
  • Method Details

    • applyAsDouble

      public double applyAsDouble(double a)
      Specified by:
      applyAsDouble in interface DoubleUnaryOperator
      Parameters:
      a - Angle.
      Returns:
      = a - k where k is an integer that satisfies lo <= a - k < lo + period.