aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/tut_arithmetic_dot_cross.cpp
blob: 0f8e4535920d7f1ab6f3a94a4c9d05a64cf291a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}