title: Eigen 2D cross product
body: <p>Can Eigen do a 2D cross product?</p>
  
  <p>I was trying to replace this code:</p>
  
  <pre><code>Eigen::Vector2f a, b;
  float result = a.x()*b.y() - b.x()*a.y();
  </code></pre>
  
  <p>With this:</p>
  
  <pre><code>Eigen::Vector2f a, b;
  float result = a.cross(b);
  </code></pre>
  
  <p>However, this gives me the following error: </p>
  
  <p><code>error C2338: THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE</code></p>
  
  <p><strong>Update</strong></p>
  
  <p>Of course <em>Avi Ginsburg</em> is right and its not really defined. So to clarify: What I'm looking for is the length of the cross product (basically the sine of the angle between the vectors, if I understand it correctly).</p>