Vec.opBinary

Implements the basic binary operators between two vectors. It supports element-wise addition, subtraction, multiplication, and division.

  1. Vec!(T, size) opBinary(Vec!(V, size) other)
    struct Vec(T, size_t size)
    const @nogc
    Vec!(T, size)
    opBinary
    (
    string op
    V
    )
    (
    Vec!(V, size) other
    )
    if (
    isNumeric!V
    )
    if (
    isNumeric!T &&
    size > 0
    )
  2. Vec!(T, size) opBinary(V scalar)

Parameters

other Vec!(V, size)

The other vector operand.

Return Value

Type: Vec!(T, size)

A new vector that is the result of applying this vector and the other to the given operation.

Meta