Hi guys,

I'm trying to get the y-axis rotation from a matrix.

I found this:

r=atan2(-M._31, sqrt(M._32*M._32+M._33*M._33);

...but I don't know if that's for D3D9 matrices. It's tricky because of the return values of atan2 as well.

I looked at D3DXMatrixDecompose() but I don't know how to get the y-axis rotation from the quaternion.

I'm hoping to get the rotation in [0...twoPi]

Thanks.