harrison-lucas / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

btQuaternion - Slerp sometimes return error values #786

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Answer:
at btQuaternion.h (line 508): const btScalar d = btScalar(1.0) / btSin(theta);
"btSin(theta)" sometimes may be equal 0...

My fix is:
const btScalar sin_theta = btSin(theta);
if (sin_theta == 0)
  return q;
const btScalar d = btScalar(1.0) / sin_theta;

Original issue reported on code.google.com by creagame...@gmail.com on 11 Jan 2014 at 3:46

GoogleCodeExporter commented 9 years ago
moved to github https://github.com/bulletphysics/bullet3/issues/64

Original comment by erwin.coumans on 30 Mar 2014 at 5:08