diff --git a/libraries/AP_Math/vector3.h b/libraries/AP_Math/vector3.h index af999b95be..27dbbcb57e 100644 --- a/libraries/AP_Math/vector3.h +++ b/libraries/AP_Math/vector3.h @@ -181,6 +181,10 @@ public: bool is_nan(void) { return isnan(x) || isnan(y) || isnan(z); } + // check if any elements are infinity + bool is_inf(void) + { return isinf(x) || isinf(y) || isinf(z); } + }; typedef Vector3 Vector3i;