Vector.opOpAssign

Performs an assign operation on the vector, modifying it.

  1. typeof(this) opOpAssign(F value)
  2. typeof(this) opOpAssign(F value)
    struct Vector(T, char[] c)
    typeof(this)
    opOpAssign
    (
    string op
    F
    )
    ()
    if (
    isArray!F
    )
    if (
    c.length > 1 &&
    areValidCoordinates(c)
    )
  3. typeof(this) opOpAssign(F value)

Parameters

value F

a number, a vector or an array with the same size

Return Value

Type: typeof(this)

Examples

auto v = vector(1, 2);
v += 4;
v *= [0, 2];
assert(v == vector(0, 12));

Meta