MCPcopy Create free account
hub / github.com/PX4/eigen / angularDistance

Method angularDistance

Eigen/src/Geometry/Quaternion.h:702–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700template <class Derived>
701template <class OtherDerived>
702EIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Scalar
703QuaternionBase<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

Callers 2

quaternionFunction · 0.80
resetCameraMethod · 0.80

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