From: divverent Date: Mon, 20 Feb 2012 15:11:32 +0000 (+0000) Subject: add a note about a VectorVectors bug X-Git-Tag: xonotic-v0.6.0~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=030579c03eadfe63ec7a350e6fdb8addebea5a70;p=xonotic%2Fdarkplaces.git add a note about a VectorVectors bug git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11708 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=c5de3c38d771c3ef40522f73dea26b463ce82d05 --- diff --git a/mathlib.c b/mathlib.c index dae0de50..3bb17628 100644 --- a/mathlib.c +++ b/mathlib.c @@ -203,6 +203,10 @@ void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up) right[0] = forward[2]; right[1] = -forward[0]; right[2] = forward[1]; + // BUG! + // assume forward = {sqrt(1/3), sqrt(1/3), -sqrt(1/3)} + // then right will be {-sqrt(1/3), -sqrt(1/3), sqrt(1/3)} + // PROBLEM? d = DotProduct(forward, right); VectorMA(right, -d, forward, right);