Vector.Subtract Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Subtract<T>(Vector<T>, T) | Subtracts a constant from a vector. |
Subtract<T>(Vector<T>, Vector<T>) | Subtracts two vectors. |
Subtract<T>(T, Vector<T>) | Subtracts a vector from a constant. |
Subtract<T>(Vector<T>, T)
Subtracts a constant from a vector.
public static Vector<T> Subtract<T>(
Vector<T> vector,
T value
)
Parameters
- vector Vector<T>
- A vector.
- value T
- The constant.
Type Parameters
- T
Return Value
Vector<T>A vector whose elements are the difference of the corresponding elements of vector and value.
Exceptions
Argument | vector is null. |
Subtract<T>(Vector<T>, Vector<T>)
Subtracts two vectors.
public static Vector<T> Subtract<T>(
Vector<T> left,
Vector<T> right
)
Parameters
Type Parameters
- T
Return Value
Vector<T>A vector whose elements are equal to the corresponding element of left minus the corresponding element of right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | left and right do not have the same length. |
Subtract<T>(T, Vector<T>)
Subtracts a vector from a constant.
public static Vector<T> Subtract<T>(
T value,
Vector<T> vector
)
Parameters
- value T
- The constant.
- vector Vector<T>
- A vector.
Type Parameters
- T
Return Value
Vector<T>A vector whose elements are the difference between the corresponding elements of vector and value.
Exceptions
Argument | vector is null. |