Re: d3dx9_36: Implement D3DXSHRotate

2012-09-03 Thread Henri Verbeet
On 3 September 2012 12:02, Rico Schüller wrote: > +sinb = sqrt( 1.0f - matrix->u.m[2][2] * matrix->u.m[2][2] ); > > I'd prefer to declare the variables as locally as possible. > As an aside, you'll probably want to use floating point functions like sqrtf() instead of ones operating on doub

Re: d3dx9_36: Implement D3DXSHRotate

2012-09-03 Thread Rico Schüller
I had another look and like to give some suggestion. On 02.09.2012 22:28, Nozomi Kodama wrote: +sinb = sqrt( 1.0f - matrix->u.m[2][2] * matrix->u.m[2][2] ); I'd prefer to declare the variables as locally as possible. +D3DXSHRotateZ(temp5, order, alpha, temp4); +memcpy(out, temp

Re: d3dx9_36: Implement D3DXSHRotate

2012-09-03 Thread Rico Schüller
On 02.09.2012 23:46, Nozomi Kodama wrote: For instance, D3DXSHAdd and D3DXSHDot accept order>D3DXSH_MAXORDER. So we must check whether it is acceptable for other D3DXSH functions to give such an order. If it is not acceptable, then we must know what the function returns. Yes, they do and I agre

Re : d3dx9_36: Implement D3DXSHRotate

2012-09-02 Thread Nozomi Kodama
For instance, D3DXSHAdd and D3DXSHDot accept order>D3DXSH_MAXORDER. So we must check whether it is acceptable for other D3DXSH functions to give such an order. If it is not acceptable, then we must know what the function returns. For the out of bound problem, I agree that we reach an out of bou

Re: d3dx9_36: Implement D3DXSHRotate

2012-09-02 Thread Rico Schüller
On 02.09.2012 22:28, Nozomi Kodama wrote: +for (order = 0; order < 10; order++) Is there a reason why we'd want to test til 9? D3DXSH_MAXORDER is 6, so 7 Should be enough? I know the other test do this, but technically I see no reason for that. Specifically the if (.. order > D3DXSH_M