Vector.opAssign

Assign a Vector from a compatible type.

struct Vector(T, ubyte N)
ref
opAssign
(
U
)
(
U rhs
)
if (
N >= 2 &&
N <= 4
)

Examples

auto v1 = Vector3I();
v1 = Vector3I(7, 8, 9);
assert(v1.v == [7, 8, 9]);
auto v2 = Vector2F();
v2 = 3.4f;
assert(v2.v == [3.4f, 3.4f]);
auto v3 = Vector4I();
v3 = [1, 3, 5, -6];
assert(v3.v == [1, 3, 5, -6]);

Meta