diff --git a/src/LinearMath/btImplicitQRSVD.h b/src/LinearMath/btImplicitQRSVD.h index 54378b8a8..7b4cfaf21 100644 --- a/src/LinearMath/btImplicitQRSVD.h +++ b/src/LinearMath/btImplicitQRSVD.h @@ -571,17 +571,18 @@ inline void singularValueDecomposition( */ inline btScalar wilkinsonShift(const btScalar a1, const btScalar b1, const btScalar a2) { - btScalar d = (btScalar)0.5 * (a1 - a2); - btScalar bs = b1 * b1; - btScalar val = d * d + bs; - if (val>SIMD_EPSILON) - { - btScalar denom = btFabs(d) + btSqrt(val); - - btScalar mu = a2 - copySign(bs / (denom), d); - // T mu = a2 - bs / ( d + sign_d*sqrt (d*d + bs)); - return mu; - } + btScalar d = (btScalar)0.5 * (a1 - a2); + btScalar bs = b1 * b1; + btScalar val = d * d + bs; + if (val>SIMD_EPSILON) + { + btScalar denom = btFabs(d) + btSqrt(val); + + btScalar mu = a2 - copySign(bs / (denom), d); + // T mu = a2 - bs / ( d + sign_d*sqrt (d*d + bs)); + return mu; + } + return a2; } /**