matrix helper: fix sign function zero case

This commit is contained in:
Matthias Grob 2022-03-21 15:47:47 +01:00
parent 1a17e9df4d
commit 03f836f79d

View File

@ -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