title: Rotation order for eulers getPitch(), getRoll(), getYaw() from Quaternion in libgdx?
body: <p>When transforming a quaternion to Euler Angles, usually there has to be a order in which the axes are rotated, like in <a href="http://quaternions.online/" rel="nofollow noreferrer">this visualization.</a></p>
  
  <p>How does it work for libgdx?</p>
  
  <p>The Quaternion class has the functions</p>
  
  <pre><code>getRoll():
  
  Math.asin(MathUtils.clamp(2f * (w*x - z * y), -1f, 1f)) : 
       (float)pole * MathUtils.PI * 0.5f;`
  
  getPitch():
  
  Math.asin(MathUtils.clamp(2f * (w*x - z * y), -1f, 1f)) : 
       (float)pole * MathUtils.PI * 0.5f;`
  
  getYaw():
  `
  MathUtils.atan2(2f * (y * w + x * z), 1f - 2f * (y * y + x * x)) : 0f;`
  </code></pre>
  
  <p>Where is the order of the resulting angles set, which axes is rotated first,second,third ?</p>
  
  <p>How are these functions related to a quaternion rotation matrix like:
  <a href="https://i.stack.imgur.com/0500x.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0500x.jpg" alt="enter image description here"></a></p>
  
  <p>Why is it that often this Rotationmatrix is given as Inverse /Transposed (equal because of orthogonality) ?</p>