title: Interpolating rotations(slerp) using Eigen
body: <p>I am trying to slerp between 2 quaternions using Eigen(thought would be the easiest).</p>
  
  <p>I found two different examples</p>
  
  <p>One,</p>
  
  <pre><code>for(int i = 0; i &lt; list.size(); i++)
  {
    Matrix3f m;
    Quaternion&lt;float,0&gt; q1 = m.toRotationMatrix();
  
    Quaternion&lt;float,0&gt; q3(q1.slerp(1,q2));
    m_node-&gt;Rotation(q3.toRotationMatrix());
  }
  </code></pre>
  
  <p>Second,</p>
  
  <pre><code>Vec3 slerp(const Vec3&amp; a, const Vec3&amp; b, const Real&amp; t)
  {
   Quaternionf qa;
   Quaternionf qb;
   qa = Quaternionf::Identity();
   qb.setFromTwoVectors(a,b); 
    return (qa.slerp(t,qb)) * a; 
   }
  </code></pre>
  
  <p>I cant really say which one is correct. There is not many documentation about this. Can anyone tell me if I should use a different library? or how can I slerp using eigen.</p>