Clips a number so that it is within the specified interval.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static double Clip(
double lowerBound,
double upperBound,
double x
)
Public Shared Function Clip (
lowerBound As Double,
upperBound As Double,
x As Double
) As Double
public:
static double Clip(
double lowerBound,
double upperBound,
double x
)
static member Clip :
lowerBound : float *
upperBound : float *
x : float -> float
Parameters
- lowerBound
- Type: SystemDouble
The lower bound of the interval. - upperBound
- Type: SystemDouble
The upper bound of the interval. - x
- Type: SystemDouble
A real number.
Return Value
Type:
DoubleIf
x is less than or equal to
lowerBound, then
lowerBound;
otherwise, if
x is greater than or equal to
upperBound, then
upperBound;
otherwise,
x.
Reference