From 1f5095e7227b94a605350a16b97adde678261f49 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Mar 2012 15:07:30 +1100 Subject: [PATCH] Math: added is_inf() on vector3f --- libraries/AP_Math/vector3.h | 4 ++++ 1 file changed, 4 insertions(+) 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;