mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Add VectorUnshear().
VectorUnshear uses the exact same shear vector to remove shear from a sheared vector. ie with: VectorShear (shear, v, w); VectorUnshear (shear, w, x); x == v within fp math limits.
This commit is contained in:
parent
bf38e6073e
commit
9a3206795e
1 changed files with 6 additions and 0 deletions
|
@ -123,6 +123,12 @@ extern const vec_t *const quat_origin;
|
|||
(c)[1] = (b)[0] * (a)[0] + (b)[1]; \
|
||||
(c)[0] = (b)[0]; \
|
||||
} while (0)
|
||||
#define VectorUnshear(a,b,c) \
|
||||
do { \
|
||||
(c)[2] = (b)[2] - (b)[1] * (a)[2] - (b)[0] * ((a)[1]-(a)[0]*(a)[2]); \
|
||||
(c)[1] = (b)[1] - (b)[0] * (a)[0]; \
|
||||
(c)[0] = (b)[0]; \
|
||||
} while (0)
|
||||
#define VectorCompMult(a,b,c) \
|
||||
do { \
|
||||
(c)[0] = (a)[0] * (b)[0]; \
|
||||
|
|
Loading…
Reference in a new issue