fix rounding error: acosf(cosom) becomes 0, causing div/0
This commit is contained in:
@@ -444,7 +444,8 @@ void RageQuatSlerp(RageVector4 *pOut, const RageVector4 &from, const RageVector4
|
||||
|
||||
// calculate coefficients
|
||||
float scale0, scale1;
|
||||
if ( 1.0f - cosom > 0 ) {
|
||||
if ( cosom < 0.9999f )
|
||||
{
|
||||
// standard case (slerp)
|
||||
float omega = acosf(cosom);
|
||||
float sinom = sinf(omega);
|
||||
|
||||
Reference in New Issue
Block a user