Vector.Clip Into<T> Method
Returns a vector whose elements are the components of a vector
constrained to be within the specified interval.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
A 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.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public static Vector<T> ClipInto<T>(
this Vector<T> vector,
T lowerBound,
T upperBound,
Vector<T>? result
)
Parameters
- vector Vector<T>
- A Vector<T>.
- lowerBound T
- The lower bound of the interval.
- upperBound T
- The upper bound of the interval.
- result Vector<T>
- The vector that is to hold the result. May be null.
Type Parameters
- T
Return Value
Vector<T>A 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 Vector<T>. 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).Exceptions
Argument | vector is null. |