Interpolating an angle counter clockwise?
<p>Right now 'm using linear bezier to interpolate angles:</p>

<pre><code>    float CardAnimation::valueAt( float valueA, float valueB, float t ) const
    {
        return (1.0f - t) * valueA + t * valueB;
    }

....
if(m_startCard.m_angle != m_endCard.m_angle)
            {
                m_targetCard-&gt;m_angle = 
                    valueAt(m_startCard.m_angle, m_endCard.m_angle,m_interval);
            }
</code></pre>

<p>This works as expected. But here is my problem. If your start angle is 0.5f and you want to go to 6.0f (in radians) then it will go clockwise from 0.5f to 6.0f when really since  6.0f - 0.5f > 3.14f it would be much smarter to go counter clockwise from 0.5f to 6.0f (resulting in moving only 0.78 radians rather than 5.5). What should I do to interpolate counter clockwise if abs(endAngle - startAngle > PI) ?</p>

<p>Thanks</p>
