| 767 | template <class Derived> |
| 768 | template <class OtherDerived> |
| 769 | EIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Scalar |
| 770 | QuaternionBase<Derived>::angularDistance(const QuaternionBase<OtherDerived>& other) const |
| 771 | { |
| 772 | EIGEN_USING_STD(atan2) |
| 773 | Quaternion<Scalar> d = (*this) * other.conjugate(); |
| 774 | return Scalar(2) * atan2( d.vec().norm(), numext::abs(d.w()) ); |
| 775 | } |
| 776 | |
| 777 | |
| 778 |