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> ClipInto<T>(
this Vector<T> vector,
T lowerBound,
T upperBound,
Vector<T> result
)
<ExtensionAttribute>
Public Shared Function ClipInto(Of T) (
vector As Vector(Of T),
lowerBound As T,
upperBound As T,
result As Vector(Of T)
) As Vector(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Vector<T>^ ClipInto(
Vector<T>^ vector,
T lowerBound,
T upperBound,
Vector<T>^ result
)
[<ExtensionAttribute>]
static member ClipInto :
vector : Vector<'T> *
lowerBound : 'T *
upperBound : 'T *
result : Vector<'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. - result
- Type: Extreme.MathematicsVectorT
The vector that is to hold the result. May be .
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