=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: include/d3dx9math.inl: Use float functions.

Alexandre Julliard julliard at winehq.org
Thu Sep 27 15:39:08 CDT 2012


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Thu Sep 27 12:14:53 2012 +0200

include/d3dx9math.inl: Use float functions.

---

 include/d3dx9math.inl |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/d3dx9math.inl b/include/d3dx9math.inl
index af6b456..5ee9a75 100644
--- a/include/d3dx9math.inl
+++ b/include/d3dx9math.inl
@@ -967,7 +967,7 @@ static inline FLOAT D3DXVec2Dot(CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
 static inline FLOAT D3DXVec2Length(CONST D3DXVECTOR2 *pv)
 {
     if (!pv) return 0.0f;
-    return sqrt( (pv->x) * (pv->x) + (pv->y) * (pv->y) );
+    return sqrtf( pv->x * pv->x + pv->y * pv->y );
 }
 
 static inline FLOAT D3DXVec2LengthSq(CONST D3DXVECTOR2 *pv)
@@ -1045,7 +1045,7 @@ static inline FLOAT D3DXVec3Dot(CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2)
 static inline FLOAT D3DXVec3Length(CONST D3DXVECTOR3 *pv)
 {
     if (!pv) return 0.0f;
-    return sqrt( (pv->x) * (pv->x) + (pv->y) * (pv->y) + (pv->z) * (pv->z) );
+    return sqrtf( pv->x * pv->x + pv->y * pv->y + pv->z * pv->z );
 }
 
 static inline FLOAT D3DXVec3LengthSq(CONST D3DXVECTOR3 *pv)
@@ -1119,7 +1119,7 @@ static inline FLOAT D3DXVec4Dot(CONST D3DXVECTOR4 *pv1, CONST D3DXVECTOR4 *pv2)
 static inline FLOAT D3DXVec4Length(CONST D3DXVECTOR4 *pv)
 {
     if (!pv) return 0.0f;
-    return sqrt( (pv->x) * (pv->x) + (pv->y) * (pv->y) + (pv->z) * (pv->z) + (pv->w) * (pv->w) );
+    return sqrtf( pv->x * pv->x + pv->y * pv->y + pv->z * pv->z + pv->w * pv->w );
 }
 
 static inline FLOAT D3DXVec4LengthSq(CONST D3DXVECTOR4 *pv)
@@ -1283,7 +1283,7 @@ static inline BOOL D3DXQuaternionIsIdentity(D3DXQUATERNION *pq)
 static inline FLOAT D3DXQuaternionLength(CONST D3DXQUATERNION *pq)
 {
     if (!pq) return 0.0f;
-    return sqrt( (pq->x) * (pq->x) + (pq->y) * (pq->y) + (pq->z) * (pq->z) + (pq->w) * (pq->w) );
+    return sqrtf( pq->x * pq->x + pq->y * pq->y + pq->z * pq->z + pq->w * pq->w );
 }
 
 static inline FLOAT D3DXQuaternionLengthSq(CONST D3DXQUATERNION *pq)




More information about the wine-cvs mailing list