From 7464e51e19ada82b88c2596ee583d8e10b5011ba Mon Sep 17 00:00:00 2001 From: David Koes Date: Fri, 3 May 2024 13:41:45 -0400 Subject: [PATCH] tweak fix --- gninasrc/lib/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gninasrc/lib/common.h b/gninasrc/lib/common.h index 17909f01..6374b081 100644 --- a/gninasrc/lib/common.h +++ b/gninasrc/lib/common.h @@ -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] } @@ -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