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:
@@ -918,7 +918,7 @@ void btConeTwistConstraint::computeTwistLimitInfo(const btQuaternion& qTwist,
|
||||
|
||||
if (twistAngle > SIMD_PI) // long way around. flip quat and recalculate.
|
||||
{
|
||||
qMinTwist = operator-(qTwist);
|
||||
qMinTwist = -(qTwist);
|
||||
twistAngle = qMinTwist.getAngle();
|
||||
}
|
||||
if (twistAngle < 0)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user