int32_t dotVec2d(vec_t left, vec_t right)
Find the dot product of two vectors.
Definition vector2d.c:75
vec_t divVec2d(vec_t vector, int32_t scalar)
Divide a vector by a scalar and return the result.
Definition vector2d.c:59
vec_t subVec2d(vec_t left, vec_t right)
Subtract two vectors and return the resulting vector.
Definition vector2d.c:27
vec_t mulVec2d(vec_t vector, int32_t scalar)
Multiply a vector by a scalar and return the result.
Definition vector2d.c:43
int32_t sqMagVec2d(vec_t vector)
Return the squared magnitude of the given vector. The square root is not used because it is slow.
Definition vector2d.c:116
vec_t rotateVec2d(vec_t vector, int32_t degree)
Rotate a vector by a number of degrees and return the result.
Definition vector2d.c:87
vec_t addVec2d(vec_t left, vec_t right)
Add two vectors and return the resulting vector.
Definition vector2d.c:11
int32_t y
The signed integer Y component of the vector.
Definition vector2d.h:39
int32_t x
The signed integer X component of the vector.
Definition vector2d.h:38
A 2D vector with signed integer X and Y components.
Definition vector2d.h:37