Browse Source

matrix helper: fix sign function zero case

v1.13.0-BW
Matthias Grob 3 years ago
parent
commit
03f836f79d
  1. 2
      src/lib/matrix/matrix/helper_functions.hpp

2
src/lib/matrix/matrix/helper_functions.hpp

@ -155,7 +155,7 @@ Type unwrap_pi(const Type last_angle, const Type new_angle) @@ -155,7 +155,7 @@ Type unwrap_pi(const Type last_angle, const Type new_angle)
template<typename T>
int sign(T val)
{
return (T(FLT_EPSILON) < val) - (val < T(FLT_EPSILON));
return (T(0) < val) - (val < T(0));
}
} // namespace matrix

Loading…
Cancel
Save