summaryrefslogtreecommitdiff
path: root/src/qcommon/q_shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon/q_shared.h')
-rw-r--r--src/qcommon/q_shared.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index 5b5daee8..81c53e4f 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -469,6 +469,10 @@ typedef struct {
#define VectorSet(v, x, y, z) ((v)[0]=(x), (v)[1]=(y), (v)[2]=(z))
#define Vector4Copy(a,b) ((b)[0]=(a)[0],(b)[1]=(a)[1],(b)[2]=(a)[2],(b)[3]=(a)[3])
#define Vector4Add(a,b,c) ((c)[0]=(a)[0]+(b)[0],(c)[1]=(a)[1]+(b)[1],(c)[2]=(a)[2]+(b)[2],(c)[3]=(a)[3]+(b)[3])
+#define Vector4Lerp( f, s, e, r ) ((r)[0]=(s)[0]+(f)*((e)[0]-(s)[0]),\
+ (r)[1]=(s)[1]+(f)*((e)[1]-(s)[1]),\
+ (r)[2]=(s)[2]+(f)*((e)[2]-(s)[2]),\
+ (r)[3]=(s)[3]+(f)*((e)[3]-(s)[3]))
#define SnapVector(v) ( (v)[0] = (int)(v)[0],\
(v)[1] = (int)(v)[1],\