VECTOR_ADD_SCALAR
Description
Adds the specified scalar value to each element in the vector. This is a broadcast addition operation between a vector and a scalar, adding the scalar value to every component of the vector.
Parameter Description
vec: Input vector, supported types includevector\<float>,vector\<double>, and other numeric vector types.scalar: The scalar value to add to each element, must be of typeinteger.
Return Result
Returns a vector of the same type as the input vector, where each element is the result of adding the scalar value to the corresponding element of the original vector.
Examples
- Add an integer scalar to each element of a float vector
- Add a negative integer scalar to each element of a vector
- Add zero to each element (returns the original vector)
