From 03f836f79d180aea46cdb22ead4274abe85e62dd Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 21 Mar 2022 15:47:47 +0100 Subject: [PATCH] matrix helper: fix sign function zero case --- src/lib/matrix/matrix/helper_functions.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/matrix/matrix/helper_functions.hpp b/src/lib/matrix/matrix/helper_functions.hpp index fa4e5c84ca..b1e0890407 100644 --- a/src/lib/matrix/matrix/helper_functions.hpp +++ b/src/lib/matrix/matrix/helper_functions.hpp @@ -155,7 +155,7 @@ Type unwrap_pi(const Type last_angle, const Type new_angle) template int sign(T val) { - return (T(FLT_EPSILON) < val) - (val < T(FLT_EPSILON)); + return (T(0) < val) - (val < T(0)); } } // namespace matrix