diff --git a/stepmania/src/RageMath.cpp b/stepmania/src/RageMath.cpp index 8f11b01f1f..3e2fb3e815 100644 --- a/stepmania/src/RageMath.cpp +++ b/stepmania/src/RageMath.cpp @@ -95,8 +95,8 @@ void RageVec4TransformCoord( RageVector4* pOut, const RageVector4* pV, const Rag cblas_sgemv(CblasRowMajor, CblasTrans, 4, 4, 1, &pM->m00, 4, &pV->x, 1, 0, &pOut->x, 1); #else - const RageMatrix &a = *pM; - const RageVector4 &v = *pV; + const RageMatrix &a = *pM; + const RageVector4 &v = *pV; *pOut = RageVector4( a.m00*v.x+a.m10*v.y+a.m20*v.z+a.m30*v.w, a.m01*v.x+a.m11*v.y+a.m21*v.z+a.m31*v.w, @@ -143,8 +143,8 @@ void RageMatrixMultiply( RageMatrix* pOut, const RageMatrix* pA, const RageMatri // // <30 cycles for theirs versus >100 for ours. // D3DXMatrixMultiply( (D3DMATRIX*)pOut, (D3DMATRIX*)pA, (D3DMATRIX*)pB ); //#else - const RageMatrix &a = *pA; - const RageMatrix &b = *pB; + const RageMatrix &a = *pA; + const RageMatrix &b = *pB; *pOut = RageMatrix( b.m00*a.m00+b.m01*a.m10+b.m02*a.m20+b.m03*a.m30, @@ -343,7 +343,7 @@ void RageQuatMultiply( RageVector4* pOut, const RageVector4 &pA, const RageVecto out.z = pA.w * pB.z + pA.z * pB.w + pA.x * pB.y - pA.y * pB.x; out.w = pA.w * pB.w - pA.x * pB.x - pA.y * pB.y - pA.z * pB.z; - float dist, square; + float dist, square; square = out.x * out.x + out.y * out.y + out.z * out.z + out.w * out.w; @@ -351,10 +351,10 @@ void RageQuatMultiply( RageVector4* pOut, const RageVector4 &pA, const RageVecto dist = 1.0f / sqrtf(square); else dist = 1; - out.x *= dist; - out.y *= dist; - out.z *= dist; - out.w *= dist; + out.x *= dist; + out.y *= dist; + out.z *= dist; + out.w *= dist; *pOut = out; } @@ -501,7 +501,7 @@ void RageQuatSlerp(RageVector4 *pOut, const RageVector4 &from, const RageVector4 scale1 = RageFastSin(t * omega) / sinom; } else - { + { // "from" and "to" quaternions are very close // ... so we can do a linear interpolation scale0 = 1.0f - t; @@ -531,8 +531,8 @@ RageMatrix RageLookAt( Y = RageVector3( Z[1] * X[2] - Z[2] * X[1], - -Z[0] * X[2] + Z[2] * X[0], - Z[0] * X[1] - Z[1] * X[0] ); + -Z[0] * X[2] + Z[2] * X[0], + Z[0] * X[1] - Z[1] * X[0] ); RageVec3Normalize(&X, &X); RageVec3Normalize(&Y, &Y); @@ -541,7 +541,7 @@ RageMatrix RageLookAt( X[0], Y[0], Z[0], 0, X[1], Y[1], Z[1], 0, X[2], Y[2], Z[2], 0, - 0, 0, 0, 1 ); + 0, 0, 0, 1 ); RageMatrix mat2; RageMatrixTranslation(&mat2, -eyex, -eyey, -eyez); @@ -615,7 +615,7 @@ float RageFastSin( float x ) float fRemainder = fIndex - iSampleIndex[0]; for( unsigned i=0; i=0 && fRemainder<=1 );