MCPcopy Create free account
hub / github.com/TinyMPC/TinyMPC / angularDistance

Method angularDistance

include/Eigen/Eigen/src/Geometry/Quaternion.h:769–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767template <class Derived>
768template <class OtherDerived>
769EIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Scalar
770QuaternionBase<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

Callers

nothing calls this directly

Calls 6

vecMethod · 0.80
atan2Function · 0.50
absFunction · 0.50
conjugateMethod · 0.45
normMethod · 0.45
wMethod · 0.45

Tested by

no test coverage detected