Elementary.Clip Method
Clips a number so that it is within the specified interval.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
If x is less than or equal to lowerBound, then lowerBound; otherwise, if x is greater than or equal to upperBound, then upperBound; otherwise, x.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static double Clip(
double lowerBound,
double upperBound,
double x
)
Parameters
- lowerBound Double
- The lower bound of the interval.
- upperBound Double
- The upper bound of the interval.
- x Double
- A real number.
Return Value
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.