11 PONCA_MULTIARCH_STD_MATH(sqrt);
14 const VectorType lq = Base::m_w.convertToLocalBasis(_q);
16 Scalar potential = m_uc + lq.dot(m_ul) + m_uq * lq.squaredNorm();
23 t = - potential / (norm*norm);
27 t = - (norm - sqrt(norm*norm -
Scalar(4) * m_uq * potential)) / (
Scalar(2) * m_uq * norm);
29 return Base::m_w.convertToGlobalBasis( lq + t * grad );