Hi,

some remarks

+    if (((*poutscale).x==0)||((*poutscale).y==0)||((*poutscale).z==0)) should be
+    if ((poutscale->x==0)||(poutscale->y==0)||(poutscale->z==0))

No need to redefine a module fonction
Replace  +    poutscale->x=module(pM->m[0][0],pM->m[0][1],pM->m[0][2]);
by
+    poutscale->x=D3DXVec3Length(&D3DXVECTOR3((pM->m[0][0],pM->m[0][1],pM->m[0][2]));

David


2008/8/5 Luis Busquets <luis.busquets@ilidium.com>
Please be aware that this function relies on D3DXQuaternionRotationMatrix and therefore the bug in the latter has to be corrected.

---
 dlls/d3dx9_36/d3dx9_36.spec |    2 +-
 dlls/d3dx9_36/math.c        |   39 ++++++++++++++++++++++++++
 dlls/d3dx9_36/tests/math.c  |   64 +++++++++++++++++++++++++++++++++++++++++++
 include/d3dx9math.h         |    1 +
 4 files changed, 105 insertions(+), 1 deletions(-)