Skip to content

Commit

Permalink
tweak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoes committed May 3, 2024
1 parent 43e0ba9 commit 7464e51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gninasrc/lib/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ __host__ inline void normalize_angle(fl &x) { // subtract or add enough 2*pi's t
x += 2 * pi;
}
if (!(x >= -pi - epsilon_fl && x <= pi + epsilon_fl)) {
x = 0;
std::cerr << "Numerical degeneracy encountered. Check for non-physical inputs. " + std::to_string(x) +
" should be between -pi and pi.";
" should be between -pi and pi.\n";
x = 0;
}
// in [-pi, pi]
}
Expand All @@ -388,7 +388,7 @@ __device__ inline void normalize_angle(fl &x) {
}
if (!(x >= -pi - epsilon_fl && x <= pi + epsilon_fl)) {
x = 0;
}
}
// TODO: put the assert back?
}
#endif
Expand Down

0 comments on commit 7464e51

Please sign in to comment.