title: Converting a 3x3 matrix to Euler/Tait Bryan angles (pitch yaw roll)
body: <p>I have the Razer Hydra SDK here, and I want to transform the rotation matrix I get from the hardware, into pitch, yaw and roll.</p>
  
  <p>The documentation states:</p>
  
  <pre><code>rot_mat - A 3x3 matrix describing the rotation of the controller.
  </code></pre>
  
  <p>My code is currently:</p>
  
  <pre><code>roll = atan2(rot_mat[2][0], rot_mat[2][1]);
  pitch = acos(rot_mat[2][2]);
  yaw = -atan2(rot_mat[0][2], rot_mat[1][2]);
  </code></pre>
  
  <p>Yet this seems to give me wrong results.</p>
  
  <p>Would somebody know how I can easily translate this, and what I am doing wrong?</p>