summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 12:24:13 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:55 +0000
commit8657069e29a6f649ef3e36ff17ff2a8051659c02 (patch)
treef57dbe5b3ba015258e8b882758278cb43723ea51 /src/qcommon
parent5a4aa95a9a34afe578333a9fcc5d21c8580b0328 (diff)
* Mostly revert my change to SnapVector, since the bug it fixed turned out
to be a red herring
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/q_shared.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index 97caa377..6eb636d6 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -462,10 +462,9 @@ typedef struct {
#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])
-// Snaps the vector to the floor value always, ignoring any weirdness from
-// snapping negative versus positive numbers
-#define Floor(fl) ((fl) >= 0.0f ? (int)(fl) : -(int)(-(fl)))
-#define SnapVector(v) ((v)[0]=Floor((v)[0]),(v)[1]=Floor((v)[1]),(v)[2]=Floor((v)[2]))
+#define SnapVector(v) ( (v)[0] = (int)(v)[0],\
+ (v)[1] = (int)(v)[1],\
+ (v)[2] = (int)(v)[2] )
// just in case you do't want to use the macros
vec_t _DotProduct( const vec3_t v1, const vec3_t v2 );