title: Calculate angle from matrix transform
body: <p>I have following line of code:
  I have applied few rotation to the rectangle at without knowing values (of how many degrees). Now I want to get Rotation or angle of element in 2D.</p>
  
  <pre><code>Rectangle element = (Rectangle)sender;
  MatrixTransform xform = element.RenderTransform as MatrixTransform;
  Matrix matrix = xform.Matrix;
  third.Content = (Math.Atan(matrix.M21 / matrix.M22)*(180/Math.PI)).ToString();
  
  and the matrix is like following
  |M11 M12 0|
  |M21 M22 0|
  |dx  dy  1|  which is Transformation Matrix I guess !!
  </code></pre>
  
  <p>This does not seems to be correct value.
  I want to get angles in <strong>0 to 360 degrees</strong> </p>