Skip to content
Snippets Groups Projects
Commit 10feab4a authored by Thomée Corentin's avatar Thomée Corentin
Browse files

Fixed the Kutta degenerate case

parent 92033815
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ double HSPM::solveOffBodyKutta() {
double _tau_terms = 2*(_a*_b + _c*_d - _e*_f - _g*_h);
double _const_terms = pow(_b,2) + pow(_d,2) - pow(_f,2) - pow(_h,2);
if (_tau2_terms < 1e-10)
if (abs(_tau2_terms) < 1e-10)
return -_const_terms / _tau_terms; // If the quadratic equation is degenerate, we can solve it directly
// Solve the quadratic equation
......
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