title: extract rotation, scale values from 2d transformation matrix
body: <p>how can i extract rotation, scale and translation values from 2d transformation matrix? i mean a have a 2d transformation </p>
  
  <pre><code>matrix = [1, 0, 0, 1, 0, 0]
  
  matrix.rotate(45 / 180 * PI)
  matrix.scale(3, 4)
  matrix.translate(50, 100)
  matrix.rotate(30 / 180 * PI)
  matrix.scale(-2, 4)
  </code></pre>
  
  <p>now my matrix have values [a, b, c, d, tx, ty]</p>
  
  <p>lets forget about the processes above and imagine that we have only the values a, b, c, d, tx, ty</p>
  
  <p>how can i find total rotation and scale values via a, b, c, d, tx, ty</p>
  
  <p>sorry for my english</p>
  
  <p>Thanks your advance</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I think it should be an answer somewhere...</p>
  
  <p>i just tried in Flash Builder (AS3) like this</p>
  
  <pre><code>   var m:Matrix = new Matrix;
     m.rotate(.25 * Math.PI);
     m.scale(4, 5);
     m.translate(100, 50);
     m.rotate(.33 * Math.PI);
     m.scale(-3, 2.5);
  
     var shape:Shape = new Shape;
     shape.transform.matrix = m;
  
     trace(shape.x, shape.y, shape.scaleX, shape.scaleY, shape.rotation);
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>x = -23.6 
  y = 278.8 
  scaleX = 11.627334873920528 
  scaleY = -13.54222263865791 
  rotation = 65.56274134518259 (in degrees)
  </code></pre>