Build a vector from its components Can be called with any combination of scalar or vectors, as long as the total number of scalar fit with length
Build a vector from an array.
Build a vector with all components assigned to one value
Alias to a type sequence holding all components
The type of a vector component
Foreach support.
Foreach support.
Foreach support.
Foreach support.
Perform a term by term operation on the vector.
Perform a scalar operation on the vector.
Perform a scalar operation on the vector.
Cast the vector to another type of component
End of the vector.
Index a vector component.
Slicing support
Assign a vector component.
Slicing support
Assign a vector component.
Slicing support
Term by term sliced assignement operation.
Perform a term by term assignment operation on the vector.
Perform a scalar assignment operation on the vector.
Slicing support
Unary "+" operation.
Unary "-" operation.
The number of components in the vector
A vector with each component set as NaN (not a number)
All components in a static array
Return the data of the array
Access the component by name.
Assign the component by name.
Access the components by swizzling.
Assign the components by swizzling.
All components in a tuple
DVec3 v; assert(v._rep[0] == 0); assert(v._rep[1] == 0); assert(v._rep[2] == 0); v = DVec3(4, 5, 6); assert(v._rep[0] == 4); assert(v._rep[1] == 5); assert(v._rep[2] == 6); assert(v[1] == 5); assert(v.z == 6); assert(v[$ - 1] == 6); assert(-v == DVec3(-4, -5, -6)); v.z = 2; v[1] = 1; assert(v[1] == 1); assert(v.z == 2); auto c = DVec4(0.2, 1, 0.6, 0.9); assert(c.r == 0.2); assert(c.g == 1); assert(c.b == 0.6); assert(c.a == 0.9); assert(c.rrwuzy == DVec!6(0.2, 0.2, 0.9, 0.2, 0.6, 1)); c.bgra = DVec4(0.3, 0.4, 0.5, 0.6); assert(c.data == [0.5, 0.4, 0.3, 0.6]);