fix rounding error: acosf(cosom) becomes 0, causing div/0

This commit is contained in:
Glenn Maynard
2004-04-26 03:11:19 +00:00
parent 8f7e6894dc
commit 5463520a12
+2 -1
View File
@@ -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);