d3dx9: Avoid variable assignment in D3DXQuaternionNormalize().

This commit is contained in:
Rico Schüller 2012-09-26 13:57:21 +02:00 committed by Alexandre Julliard
parent db8df8bc7c
commit 5accb12c12
1 changed files with 8 additions and 11 deletions

View File

@ -1338,23 +1338,20 @@ D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQU
return pout;
}
D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq)
D3DXQUATERNION * WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *out, const D3DXQUATERNION *q)
{
D3DXQUATERNION out;
FLOAT norm;
TRACE("(%p, %p)\n", pout, pq);
TRACE("out %p, q %p\n", out, q);
norm = D3DXQuaternionLength(pq);
norm = D3DXQuaternionLength(q);
out.x = pq->x / norm;
out.y = pq->y / norm;
out.z = pq->z / norm;
out.w = pq->w / norm;
out->x = q->x / norm;
out->y = q->y / norm;
out->z = q->z / norm;
out->w = q->w / norm;
*pout=out;
return pout;
return out;
}
D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle)