From 8c51c293f44ed06b10d778d9fb6dd96a5bd9c971 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 2 Apr 2003 23:37:58 +0000 Subject: [PATCH] change matrix multiplies to degrees --- stepmania/src/RageMath.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageMath.cpp b/stepmania/src/RageMath.cpp index c608aae70a..96391a8c3d 100644 --- a/stepmania/src/RageMath.cpp +++ b/stepmania/src/RageMath.cpp @@ -13,6 +13,7 @@ #include "RageMath.h" #include "RageTypes.h" +#include "RageUtil.h" #include void RageVec2Normalize( RageVector2* pOut, const RageVector2* pV ) @@ -100,7 +101,9 @@ void RageMatrixScaling( RageMatrix* pOut, float x, float y, float z ) } void RageMatrixRotationX( RageMatrix* pOut, float theta ) -{ /* UNTESTED */ +{ + theta *= PI/180; + RageMatrixIdentity(pOut); pOut->m[1][1] = cosf(theta); pOut->m[2][2] = pOut->m[1][1]; @@ -110,7 +113,9 @@ void RageMatrixRotationX( RageMatrix* pOut, float theta ) } void RageMatrixRotationY( RageMatrix* pOut, float theta ) -{ /* UNTESTED */ +{ + theta *= PI/180; + RageMatrixIdentity(pOut); pOut->m[0][0] = cosf(theta); pOut->m[2][2] = pOut->m[0][0]; @@ -121,6 +126,8 @@ void RageMatrixRotationY( RageMatrix* pOut, float theta ) void RageMatrixRotationZ( RageMatrix* pOut, float theta ) { + theta *= PI/180; + RageMatrixIdentity(pOut); pOut->m[0][0] = cosf(theta); pOut->m[1][1] = pOut->m[0][0];