mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 22:00:05 +00:00
return a value in a degenerate svd case
re-disable svd by default
This commit is contained in:
parent
7bffbb2351
commit
938ac51da7
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user