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();
Код: Выделить всё
Eigen::Vector2f a, b;
float result = a.cross(b);
Код: Выделить всё
error C2338: THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZEOf 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).
Источник: https://stackoverflow.com/questions/330 ... ss-product
Мобильная версия