From 5463520a12ff3eaf650c357876ec293d5ed3483b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 26 Apr 2004 03:11:19 +0000 Subject: [PATCH] fix rounding error: acosf(cosom) becomes 0, causing div/0 --- stepmania/src/RageMath.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageMath.cpp b/stepmania/src/RageMath.cpp index 49efe58edd..44d4942f10 100644 --- a/stepmania/src/RageMath.cpp +++ b/stepmania/src/RageMath.cpp @@ -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);