=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Use float function in D3DXPlaneNormalize().
Alexandre Julliard
julliard at winehq.org
Fri Sep 28 11:39:03 CDT 2012
Module: wine
Branch: master
Commit: e420409b8d1e1be16b9085451c240460f81bbd20
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e420409b8d1e1be16b9085451c240460f81bbd20
Author: Rico Schüller <kgbricola at web.de>
Date: Fri Sep 28 08:43:04 2012 +0200
d3dx9: Use float function in D3DXPlaneNormalize().
---
dlls/d3dx9_36/math.c | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index d54095a..24303d2 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -1197,30 +1197,29 @@ D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pout, CONST D3DXPLANE *p
return pout;
}
-D3DXPLANE* WINAPI D3DXPlaneNormalize(D3DXPLANE *pout, CONST D3DXPLANE *pp)
+D3DXPLANE * WINAPI D3DXPlaneNormalize(D3DXPLANE *out, const D3DXPLANE *p)
{
- D3DXPLANE out;
FLOAT norm;
- TRACE("(%p, %p)\n", pout, pp);
+ TRACE("out %p, p %p\n", out, p);
- norm = sqrt(pp->a * pp->a + pp->b * pp->b + pp->c * pp->c);
- if ( norm )
+ norm = sqrtf(p->a * p->a + p->b * p->b + p->c * p->c);
+ if (norm)
{
- out.a = pp->a / norm;
- out.b = pp->b / norm;
- out.c = pp->c / norm;
- out.d = pp->d / norm;
+ out->a = p->a / norm;
+ out->b = p->b / norm;
+ out->c = p->c / norm;
+ out->d = p->d / norm;
}
else
{
- out.a = 0.0f;
- out.b = 0.0f;
- out.c = 0.0f;
- out.d = 0.0f;
+ out->a = 0.0f;
+ out->b = 0.0f;
+ out->c = 0.0f;
+ out->d = 0.0f;
}
- *pout = out;
- return pout;
+
+ return out;
}
D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, CONST D3DXPLANE *pplane, CONST D3DXMATRIX *pm)
More information about the wine-cvs
mailing list