]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
vec3_not: be consistent with compile-time behavior here
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 12 Nov 2013 15:05:54 +0000 (16:05 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 12 Nov 2013 15:05:54 +0000 (16:05 +0100)
fold.c

diff --git a/fold.c b/fold.c
index eb7e8e6981ab64c3721fd45388fd69b2457f9b3f..7c2f66cf19f14e560be457c5ea5111e7388368b8 100644 (file)
--- a/fold.c
+++ b/fold.c
@@ -123,9 +123,9 @@ static GMQCC_INLINE vec3_t vec3_xorvf(vec3_t a, qcfloat_t b) {
 
 static GMQCC_INLINE vec3_t vec3_not(vec3_t a) {
     vec3_t out;
-    out.x = (qcfloat_t)(~((qcint_t)a.x));
-    out.y = (qcfloat_t)(~((qcint_t)a.y));
-    out.z = (qcfloat_t)(~((qcint_t)a.z));
+    out.x = -1-a.x;
+    out.y = -1-a.y;
+    out.z = -1-a.z;
     return out;
 }