Commit e1891980 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

[Minor][C++] Add precision argument in defineSameRotation(Quat,Quat)

parent 81d11699
......@@ -56,9 +56,10 @@ namespace se3
///
template <typename Derived, typename otherDerived>
bool defineSameRotation(const Eigen::QuaternionBase<Derived> & q1,
const Eigen::QuaternionBase<otherDerived> & q2)
const Eigen::QuaternionBase<otherDerived> & q2,
const typename Derived::RealScalar & prec = Eigen::NumTraits<typename Derived::Scalar>::dummy_precision())
{
return (q1.coeffs().isApprox(q2.coeffs()) || q1.coeffs().isApprox(-q2.coeffs()) );
return (q1.coeffs().isApprox(q2.coeffs(), prec) || q1.coeffs().isApprox(-q2.coeffs(), prec) );
}
/// Approximately normalize by applying the first order limited development
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment