Overview
/
KCL Standard Library
/
Functions
/
vector::sub

vector::subFunction in std::vector

Subtracts from every element of u its corresponding element in v. Both vectors must have the same length. Returns a new vector of the same length. In other words, component-wise subtraction.

Arguments

NameTypeDescriptionRequired
u[number]Yes
v[number]Yes

Returns

[number]

Examples