diff --git a/libraries/AP_Math/vector3.h b/libraries/AP_Math/vector3.h index d2db6b19d0..83b31a6b90 100644 --- a/libraries/AP_Math/vector3.h +++ b/libraries/AP_Math/vector3.h @@ -132,6 +132,9 @@ public: // check if any elements are infinity bool is_inf(void) const; + // check if all elements are zero + bool is_zero(void) const { return x==0 && y == 0 && z == 0; } + // rotate by a standard rotation void rotate(enum Rotation rotation);