Add a vectorized implementation of atan2 to Eigen.

This commit is contained in:
Rasmus Munk Larsen
2022-09-28 20:46:49 +00:00
parent b3bf8d6a13
commit 1e1848fdb1
7 changed files with 104 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
Array<double,1,3> x(8,-25,3),
y(1./3.,0.5,-2.);
cout << "atan2([" << x << "], [" << y << "]) = " << x.atan2(y) << endl; // using ArrayBase::pow
cout << "atan2([" << x << "], [" << y << "] = " << atan2(x,y) << endl; // using Eigen::pow