[PATCH] d3dx9: Reduce rounding error in D3DXQuaternionToAxisAngle

Alex Henrie alexhenrie24 at gmail.com
Thu Nov 9 07:15:01 CST 2017


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
Fixes test failure on 64-bit Linux.
---
 dlls/d3dx9_36/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index 8f5f5b2413..2efb7cc0fa 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -1651,7 +1651,7 @@ void WINAPI D3DXQuaternionToAxisAngle(const D3DXQUATERNION *pq, D3DXVECTOR3 *pax
         paxis->z = pq->z;
     }
     if (pangle)
-        *pangle = 2.0f * acosf(pq->w);
+        *pangle = 2.0f * acos(pq->w); /* acosf has too much rounding error */
 }
 
 /*_________________D3DXVec2_____________________*/
-- 
2.14.2




More information about the wine-patches mailing list