Returns a vector whose elements are the components of a vector
constrained to be within the specified interval.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Vector<T> Clip<T>(
this Vector<T> vector,
T lowerBound,
T upperBound
)
<ExtensionAttribute>
Public Shared Function Clip(Of T) (
vector As Vector(Of T),
lowerBound As T,
upperBound As T
) As Vector(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Vector<T>^ Clip(
Vector<T>^ vector,
T lowerBound,
T upperBound
)
[<ExtensionAttribute>]
static member Clip :
vector : Vector<'T> *
lowerBound : 'T *
upperBound : 'T -> Vector<'T>
Parameters
- vector
- Type: Extreme.MathematicsVectorT
A VectorT. - lowerBound
- Type: T
The lower bound of the interval. - upperBound
- Type: T
The upper bound of the interval.
Type Parameters
- T
Return Value
Type:
VectorTA vector whose elements are the corresponding element
of
vector constrained as follows:
If the value is less than or equal to
lowerBound, then
lowerBound;
otherwise, if the value is greater than or equal to
upperBound, then
upperBound;
otherwise, the value is unchanged.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
VectorT. 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).
Reference