mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 21:23:33 +08:00
Catch quaternion canonical corner cases (#116)
This commit is contained in:
@@ -78,4 +78,10 @@ Type wrap_2pi(Type x)
|
||||
return wrap(x, Type(0), Type(M_TWOPI));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
int sign(T val)
|
||||
{
|
||||
return (T(FLT_EPSILON) < val) - (val < T(FLT_EPSILON));
|
||||
}
|
||||
|
||||
} // namespace matrix
|
||||
|
||||
Reference in New Issue
Block a user