Removed global operator- in btQuaternion, and rewrote the 'getAxis' method

Add a unit test for testQuaternionGetAxisAngle
Thanks to ejtttje, fixes Issue 538
This commit is contained in:
erwin.coumans
2011-09-13 23:37:05 +00:00
parent 02a0574ceb
commit b690019e39
5 changed files with 108 additions and 13 deletions

View File

@@ -663,7 +663,7 @@ void btHingeConstraint::setMotorTarget(const btQuaternion& qAinB, btScalar dt)
btScalar targetAngle = qHinge.getAngle();
if (targetAngle > SIMD_PI) // long way around. flip quat and recalculate.
{
qHinge = operator-(qHinge);
qHinge = -(qHinge);
targetAngle = qHinge.getAngle();
}
if (qHinge.getZ() < 0)