Skip to content
Snippets Groups Projects
Commit 7fdb85bc authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Avoid temporal variables

parent 54d8f10c
No related branches found
No related tags found
No related merge requests found
......@@ -31,16 +31,13 @@ bool LocalParametrizationQuaternion::plus(const Eigen::Map<Eigen::VectorXs>& _q,
Quaternions dq(AngleAxis<WolfScalar>(angle, axis));
// result as a quaternion
Quaternions qout;
if (global_delta_)
// the delta is in global reference
qout = dq * Map<const Quaternions>(&_q(0));
_q_plus_delta_theta = (dq * Map<const Quaternions>(&_q(0))).coeffs();
else
// the delta is in local reference
qout = Map<const Quaternions>(&_q(0)) * dq;
_q_plus_delta_theta = (Map<const Quaternions>(&_q(0)) * dq).coeffs();
// result as a vector map
_q_plus_delta_theta = qout.coeffs();
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment