Improved conversions between rotation matrices and Euler angles.