Vector.this

Constructs a Vector with all elements initialized separately

  1. this(T scalar)
  2. this(T[N] values)
  3. this(R range)
  4. this(U value)
  5. this(Args args)
    struct Vector(T, uint N)
    this
    (
    Args...
    )
    (
    const auto ref Args args
    )
    if (
    args.length > 1 &&
    args.length <= N
    )
    if (
    N > 0
    )

Examples

Vec3 v;
v = Vec3(1, 2);
assert(v == [1, 2, 0]);
v = Vec3(1, 2, 3);
assert(v == [1, 2, 3]);

Meta