Vector.opDispatch

Implements swizzling.

  1. auto opDispatch()
    struct Vector(type, int dim)
    nothrow @nogc pure nothrow @nogc pure nothrow @nogc @safe @nogc pure const nothrow
    opDispatch
    (
    string op
    U = void
    )
    ()
    if (
    isValidSwizzle!(op)
    )
    if (
    (dim >= 2) &&
    (dim <= 4)
    )
  2. void opDispatch(RHS rhs)

Examples

vec4i vi = [4, 1, 83, 10];
assert(vi.zxxyw == [83, 4, 4, 1, 10]);

Meta