=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Use float functions in D3DXQuaternionRotationAxis().

Alexandre Julliard julliard at winehq.org
Wed Sep 26 14:06:50 CDT 2012


Module: wine
Branch: master
Commit: db8df8bc7c5e03427f07a596125dec4c52d638be
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=db8df8bc7c5e03427f07a596125dec4c52d638be

Author: Rico Schüller <kgbricola at web.de>
Date:   Wed Sep 26 13:57:11 2012 +0200

d3dx9: Use float functions in D3DXQuaternionRotationAxis().

---

 dlls/d3dx9_36/math.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index 3f0e8e4..c6fa19a 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -1357,18 +1357,20 @@ D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQ
     return pout;
 }
 
-D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *pout, CONST D3DXVECTOR3 *pv, FLOAT angle)
+D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle)
 {
     D3DXVECTOR3 temp;
 
-    TRACE("(%p, %p, %f)\n", pout, pv, angle);
+    TRACE("out %p, v %p, angle %f\n", out, v, angle);
 
-    D3DXVec3Normalize(&temp, pv);
-    pout->x = sin( angle / 2.0f ) * temp.x;
-    pout->y = sin( angle / 2.0f ) * temp.y;
-    pout->z = sin( angle / 2.0f ) * temp.z;
-    pout->w = cos( angle / 2.0f );
-    return pout;
+    D3DXVec3Normalize(&temp, v);
+
+    out->x = sinf(angle / 2.0f) * temp.x;
+    out->y = sinf(angle / 2.0f) * temp.y;
+    out->z = sinf(angle / 2.0f) * temp.z;
+    out->w = cosf(angle / 2.0f);
+
+    return out;
 }
 
 D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix(D3DXQUATERNION *pout, CONST D3DXMATRIX *pm)




More information about the wine-cvs mailing list