RMathClampToInterval Method |
Clamps the value x to the interval [xmin, xmax]. If Double.NaN is provided, the return value is Double.NaN.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static double ClampToInterval(
this double x,
double xmin,
double xmax
)
Parameters
- x Double
- The x value.
- xmin Double
- The interval minimum.
- xmax Double
- The interval maximum.
Return Value
DoubleThe value
x clamped to the interval [
xmin,
xmax]. If Double.NaN is provided, the return value is Double.NaN.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also