mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-21 17:19:36 +08:00
13 lines
244 B
C++
13 lines
244 B
C++
#include <iostream>
|
|
#include <Eigen/Dense>
|
|
|
|
using namespace Eigen;
|
|
int main()
|
|
{
|
|
Vector3d v(1,2,3);
|
|
Vector3d w(0,1,2);
|
|
|
|
std::cout << "Dot product: " << v.dot(w) << std::endl;
|
|
std::cout << "Cross product:\n" << v.cross(w) << std::endl;
|
|
}
|