How to calculate rotation angle of closest pane in carousel
<p>I have this carousel which rotates in 3D with the use of <code>-webkit-transform: rotateX(rotation in deg);</code>. It has 10 panes which means every 36deg there is a pane centered. </p>

<p>Now, I'm trying to create a "snap to" effect called on a <code>touchend</code> event, setting the closest pane centered flat in front. </p>

<p>My problem is, from an arbitrary rotation value, say -1820 deg, how do I calculate which pane, or rather, at what degree is the closest pane?</p>

<p>Hope that makes sense. A hint would be much appreciated.</p>
