public class DoubleUnaryOperators extends Object
DoubleUnaryOperator instances| Modifier and Type | Method and Description |
|---|---|
static DoubleUnaryOperator |
affine(double factor,
double addend)
Returns a
DoubleUnaryOperator that is an affine transformation,
returning factor * value + addend. |
static DoubleUnaryOperator |
clamp(DoubleUnaryOperator function,
double min,
double max)
Returns a
DoubleUnaryOperator that clamps the results from the
given function to the interval [min,max] |
static DoubleUnaryOperator |
interpolate(double min,
double max)
Returns a
DoubleUnaryOperator that maps the interval [0,1]
to the interval [min,max] |
static DoubleUnaryOperator |
interpolate(double minSource,
double maxSource,
double minTarget,
double maxTarget)
Returns a
DoubleUnaryOperator that maps the interval
[minSource,maxSource] to the interval [minTarget,maxTarget],
interpolating linearly. |
public static DoubleUnaryOperator interpolate(double min, double max)
DoubleUnaryOperator that maps the interval [0,1]
to the interval [min,max]min - The minimum valuemax - The maximum valueDoubleUnaryOperatorpublic static DoubleUnaryOperator interpolate(double minSource, double maxSource, double minTarget, double maxTarget)
DoubleUnaryOperator that maps the interval
[minSource,maxSource] to the interval [minTarget,maxTarget],
interpolating linearly.minSource and maxSource
value should have a reasonable difference.minSource - The minimum source valuemaxSource - The maximum source valueminTarget - The minimum target valuemaxTarget - The maximum target valueDoubleUnaryOperatorpublic static DoubleUnaryOperator clamp(DoubleUnaryOperator function, double min, double max)
DoubleUnaryOperator that clamps the results from the
given function to the interval [min,max]function - The function to clampmin - The minimum valuemax - The maximum valueDoubleUnaryOperatorpublic static DoubleUnaryOperator affine(double factor, double addend)
DoubleUnaryOperator that is an affine transformation,
returning factor * value + addend.factor - The factoraddend - The addendDoubleUnaryOperatorCopyright © 2015. All rights reserved.