Package org.apache.commons.numbers.angle
Class Reduce
- java.lang.Object
-
- org.apache.commons.numbers.angle.Reduce
-
- All Implemented Interfaces:
java.util.function.DoubleUnaryOperator
public class Reduce extends java.lang.Object implements java.util.function.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)
Create an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
applyAsDouble(double x)
-