title: Get number of CSS3 rotation cycles from matrix3d
body: <p>I am trying to rotate an image using CSS3 <code>rotateY</code>. I need to get the angle of the rotation using jQuery.</p>
  
  <p>My problem is understanding how many cycles the image has rotated.</p>
  
  <p>Example:</p>
  
  <pre><code>180 degrees: matrix3d(-1, 0, -0.00000000000000012246467991473532, 0, 0, 1, 0, 0, 0.00000000000000012246467991473532, 0, -1, 0, 0, 0, 0, 1) 
  360 degrees: matrix3d(1, 0, 0.00000000000000024492935982947064, 0, 0, 1, 0, 0, -0.00000000000000024492935982947064, 0, 1, 0, 0, 0, 0, 1)
  540 degrees: matrix3d(-1, 0, -0.00000000000000036739403974420594, 0, 0, 1, 0, 0, 0.00000000000000036739403974420594, 0, -1, 0, 0, 0, 0, 1) 
  720 degrees: matrix3d(1, 0, 0.0000000000000004898587196589413, 0, 0, 1, 0, 0, -0.0000000000000004898587196589413, 0, 1, 0, 0, 0, 0, 1)
  </code></pre>
  
  <p>As you can see with each 180 degrees, the absolute value of the third element adds 0.00000000000000012246467991473532. I would be satisfied with this result, however at some point this logic breaks and does not apply any more. </p>
  
  <p>After the 4th cycle numbers that are being added become random.</p>
  
  <p>What is correct way to get number of rotation cycles?</p>