mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 12:23:35 +08:00
Coerce default epsilon values to Type
This commit is contained in:
@@ -32,7 +32,7 @@ bool is_finite(Type x) {
|
||||
* @return true if the two values are considered equal, false otherwise
|
||||
*/
|
||||
template<typename Type>
|
||||
bool isEqualF(const Type x, const Type y, const Type eps = 1e-4f)
|
||||
bool isEqualF(const Type x, const Type y, const Type eps = Type(1e-4f))
|
||||
{
|
||||
return (matrix::fabs(x - y) <= eps)
|
||||
|| (isnan(x) && isnan(y))
|
||||
|
||||
Reference in New Issue
Block a user