AP_Math: added is_zero() method to Vector3

This commit is contained in:
Andrew Tridgell 2013-12-09 09:49:44 +11:00
parent 0cacc7eaeb
commit db400ffa51
1 changed files with 3 additions and 0 deletions

View File

@ -132,6 +132,9 @@ public:
// check if any elements are infinity // check if any elements are infinity
bool is_inf(void) const; 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 // rotate by a standard rotation
void rotate(enum Rotation rotation); void rotate(enum Rotation rotation);