Commit 5accb12c authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Avoid variable assignment in D3DXQuaternionNormalize().

parent db8df8bc
...@@ -1338,23 +1338,20 @@ D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQU ...@@ -1338,23 +1338,20 @@ D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQU
return pout; return pout;
} }
D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) D3DXQUATERNION * WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *out, const D3DXQUATERNION *q)
{ {
D3DXQUATERNION out;
FLOAT norm; FLOAT norm;
TRACE("(%p, %p)\n", pout, pq); TRACE("out %p, q %p\n", out, q);
norm = D3DXQuaternionLength(pq);
out.x = pq->x / norm; norm = D3DXQuaternionLength(q);
out.y = pq->y / norm;
out.z = pq->z / norm;
out.w = pq->w / norm;
*pout=out; out->x = q->x / norm;
out->y = q->y / norm;
out->z = q->z / norm;
out->w = q->w / norm;
return pout; return out;
} }
D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle) D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment