d2d.math.Vector

Vector

Members

Classes

Vector
class Vector(T, uint dimensions)

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

Functions

cross
Vector!(T, 3) cross(Vector!(T, size) first, Vector!(T, size) second)

Calculates the cross product or the perpendicular vector to two vectors Currently only works on 2 or 3 dimensional vectors

dot
T dot(Vector!(T, dim) first, Vector!(T, dim) second)

Calculates the dot product or the similarity of two vectors

Meta