A vector constructor; takes in the number of args given and assigns them as components
A vector constructor; takes in a value that acts as both vector components
A constructor that sets all elements to 0
A copy constructor for a vector; makes the same vector, but as a different instance
Applies the given function to each element of the vector
Applies the given function to each element of the vector and returns the results in a new vector
Allows assigning the vector to a static array to set all components of the vector
Allows assigning the vector to a single value to set all elements of the vector to such a value
Allows the vector to be used with normal operators Works component-wise (eg. (3, 2, 1) + (1, 2, 3) = (4, 4, 4))
Allows the vector to be used with normal operators Works component-wise (eg. (3, 2, 1) + (1, 2, 3) = (4, 4, 4))
Allows the vector to be used with normal operators Works component-wise, so each operation of the constant is applied to each component
Casts the vector to a vector of another type
Returns whether the vector is equal to another vector or constant Uses approxEquals to do easy equality for vectors of doubles
Allows the vector to have the joint operator assign syntax Works component-wise (eg. (3, 2, 1) += (1, 2, 3) makes (3, 2, 1) into (4, 4, 4))
Allows the vector to have the joint operator assign syntax Works component-wise, so each operation of the constant is applied to each component
Allows the vector to have the joint operator assign syntax Works component-wise, so each operation of the constant is applied to each component
Allows unary functions to be applied to the vector; aplies the same operator to all components
Gives the vector a pretty string format (eg. (1, 2, 3) => <1, 2, 3>)
Sets the angles of the vector where the angles are given in radians Angles are direction angles (eg. first angle is direction from x, second is direction from y, etc...) 0 goes along the positive axis
Gets the angles of the vector where the angles are given in radians Angles are direction angles (eg. first angle is direction from x, second is direction from y, etc...) 0 goes along the positive axis
Sets the length of the vector Maintains component ratios of the vector
Gets the length of the vector
The components of the vector
A vector is an object representing distance in vertical and horizontal directions in multidimensional space Components are the first template parameter with the second template parameter being vector dimensionality Most vector operations take advantage of parallelism to do simple arithmetic on each component in parallel TODO: slices returning vectors, swizzling, and dispatch forwarding