mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-08-02 04:58:15 +08:00
replace quiet_NaN() with INFINITY (#70)
- solves undefined symbols for QURT Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
@@ -6,8 +6,6 @@
|
|||||||
#include <px4_defines.h>
|
#include <px4_defines.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
namespace matrix
|
namespace matrix
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -35,7 +33,7 @@ Type wrap_pi(Type x)
|
|||||||
x -= Type(2 * M_PI);
|
x -= Type(2 * M_PI);
|
||||||
|
|
||||||
if (c++ > 100) {
|
if (c++ > 100) {
|
||||||
return std::numeric_limits<Type>::quiet_NaN();
|
return INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +43,7 @@ Type wrap_pi(Type x)
|
|||||||
x += Type(2 * M_PI);
|
x += Type(2 * M_PI);
|
||||||
|
|
||||||
if (c++ > 100) {
|
if (c++ > 100) {
|
||||||
return std::numeric_limits<Type>::quiet_NaN();
|
return INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +63,7 @@ Type wrap_2pi(Type x)
|
|||||||
x -= Type(2 * M_PI);
|
x -= Type(2 * M_PI);
|
||||||
|
|
||||||
if (c++ > 100) {
|
if (c++ > 100) {
|
||||||
return std::numeric_limits<Type>::quiet_NaN();
|
return INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +73,7 @@ Type wrap_2pi(Type x)
|
|||||||
x += Type(2 * M_PI);
|
x += Type(2 * M_PI);
|
||||||
|
|
||||||
if (c++ > 100) {
|
if (c++ > 100) {
|
||||||
return std::numeric_limits<Type>::quiet_NaN();
|
return INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user