Can Eigen do a 2D cross product?
I was trying to replace this code:
Eigen::Vector2f a, b;
float result = a.x()*b.y() - b.x()*a.y();
With this:
Eigen::Vector2f a, b;
float result = a.cross(b);
However, this gives me the following error:
error C2338: THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE
Update
Of course Avi Ginsburg 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).