Add Vector3Scale macro.

Vector3Scale individually scales the components of one vector by the
components of another vector.
This commit is contained in:
Bill Currie 2011-11-26 11:31:15 +09:00
parent 4044f9d8e2
commit 3a386293fc

View file

@ -95,6 +95,12 @@ extern const vec_t * const quat_origin;
(c)[1] = (a)[1] * (b); \
(c)[2] = (a)[2] * (b); \
} while (0)
#define Vector3Scale(a,b,c) \
do { \
(c)[0] = (a)[0] * (b)[0]; \
(c)[1] = (a)[1] * (b)[1]; \
(c)[2] = (a)[2] * (b)[2]; \
} while (0)
#define VectorCompare(x, y) \
(((x)[0] == (y)[0]) && ((x)[1] == (y)[1]) && ((x)[2] == (y)[2]))