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
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);
norm = D3DXQuaternionLength(pq);
TRACE("out %p, q %p\n", out, q);
out.x = pq->x / norm;
out.y = pq->y / norm;
out.z = pq->z / norm;
out.w = pq->w / norm;
norm = D3DXQuaternionLength(q);
*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)
......
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