Constructs the vector If a single value is passed the vector, the vector will be cleared with this value If a vector with a higher dimension is passed the vector will hold the first values up to its dimension If mixed types are passed they will be joined together ( allowed types: vector, static array, $( I vt ))
Construct a Vector from another Vector
Construct a Vector from a single value
Sets all values of the vector to value
Componentwise binary vector-skalar operation: addition, subtraction, multiplication, division
Componentwise binary operation with aonther vector: addition, subtraction, multiplication, division
Componentwise binary skalar-vector operation: addition, subtraction, multiplication, division
FloatingPoint valueType, Returns true if all values are not nan and finite, otherwise false
Op= Operation with a scalar
Componentwise Op= Operation with another vector
TODO : This does not work Negate the vector
Returns the current vector formatted as string, useful for printing the vector
Returns the euclidean length of the vector
FloatingPoint valueType, Returns true if all values are not nan and finite, otherwise false
Returns a pointer to the coordinates.
generates one swizzle setter property for a given permutation
Generates all possible swizzle getter properties, creates also property aliases e.g. rgba
generates all possible swizzle setter properties for the default permutation ( e.g. [0,1,2,3] )
Holds all coordinates, length conforms dimension
the value type of each vector element
specifies the dimension of the vector, can be 1, 2, 3 or 4
alias Vector!(int, 3) vec3i; alias Vector!(float, 4) vec4; alias Vector!(real, 2) vec2r;
Base template for all vector-types.