mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
matrix helper: fix sign function zero case
This commit is contained in:
parent
1a17e9df4d
commit
03f836f79d
@ -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…
x
Reference in New Issue
Block a user