Package org.apache.commons.numbers.angle
Class Reduce
- java.lang.Object
-
- org.apache.commons.numbers.angle.Reduce
-
- All Implemented Interfaces:
DoubleUnaryOperator
public class Reduce extends Object implements DoubleUnaryOperator
Reduces|a - offset|
to the primary interval[0, |period|)
. Specifically, thecomputed value
is:a - |period| * floor((a - offset) / |period|) - offset
.
-
-
Constructor Summary
Constructors Constructor Description Reduce(double offset, double period)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
applyAsDouble(double x)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.DoubleUnaryOperator
andThen, compose
-
-
-
-
Constructor Detail
-
Reduce
public Reduce(double offset, double period)
- Parameters:
offset
- Value that will be mapped to0
.period
- Period.
-
-
Method Detail
-
applyAsDouble
public double applyAsDouble(double x)
- Specified by:
applyAsDouble
in interfaceDoubleUnaryOperator
-
-