| 700 | template <class Derived> |
| 701 | template <class OtherDerived> |
| 702 | EIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Scalar |
| 703 | QuaternionBase<Derived>::angularDistance(const QuaternionBase<OtherDerived>& other) const |
| 704 | { |
| 705 | EIGEN_USING_STD_MATH(atan2) |
| 706 | Quaternion<Scalar> d = (*this) * other.conjugate(); |
| 707 | return Scalar(2) * atan2( d.vec().norm(), numext::abs(d.w()) ); |
| 708 | } |
| 709 | |
| 710 | |
| 711 |