Vector.opBinary

Returns a new vector of greater dimension by copying elements and appending values from other.

  1. Vector opBinary(T scalar)
  2. auto opBinary(U scalar)
  3. Vector!(T, max(N, M)) opBinary(T[M] other)
  4. Vector!(CommonType!(U, T), max(N, M)) opBinary(U[M] other)
  5. Vector!(T, N + 1) opBinary(T scalar)
  6. Vector!(T, N + M) opBinary(T[M] other)
    struct Vector(T, uint N)
    pure const
    Vector!(T, N + M)
    opBinary
    (
    string op : "~"
    uint M
    )
    (
    const auto ref T[M] other
    )
    if (
    N > 0
    )

Examples

Vec2 v1 = [1, 2];
assert(v1 ~ [3f, 4f] == Vec4(1, 2, 3, 4));
assert(v1 ~ Vec2(3f, 4f) == Vec4(1, 2, 3, 4));

Meta