Template Function otyca::operator*=(std::vector<T>&, const T&)
Function Documentation
-
template<typename T>
void otyca::operator*=(std::vector<T> &v1, const T &v2) Multiplies each element of the vector by a scalar value.
This function applies the multiplication assignment operator (
*=
) to each element of the vector, multiplying each element by the specified scalar value.Note
This function modifies the vector
v1
in place. If the size of the vector is not consistent with the intended operation, the behavior is undefined.- Template Parameters:
T – The type of elements in the vector.
- Parameters:
v1 – The vector whose elements will be multiplied.
v2 – The scalar value to multiply each element of the vector by.