Vec.opBinary

Adds a scalar value to a vector, element-wise.

  1. MY_TYPE opBinary(Vec!(V, size) other)
  2. MY_TYPE opBinary(V scalar)
    struct Vec(T, size_t size)
    const @nogc
    MY_TYPE
    opBinary
    (
    string op : "+"
    V
    )
    ()
    if (
    isNumeric!V
    )
    if (
    isNumeric!T &&
    size > 0
    )
  3. MY_TYPE opBinary(Vec!(V, size) other)
  4. MY_TYPE opBinary(V factor)
  5. MY_TYPE opBinary(V factor)

Parameters

scalar V

The scalar value to add to the vector.

Return Value

Type: MY_TYPE

A vector representing the sum of this and the scalar value applied to all elements.

Meta