Browse Source

Math: add Vector2 is_zero method

mission-4.1.18
Randy Mackay 10 years ago
parent
commit
39340e70f8
  1. 3
      libraries/AP_Math/vector2.h

3
libraries/AP_Math/vector2.h

@ -105,6 +105,9 @@ struct Vector2 @@ -105,6 +105,9 @@ struct Vector2
// check if any elements are infinity
bool is_inf(void) const;
// check if all elements are zero
bool is_zero(void) const { return (fabsf(x) < FLT_EPSILON) && (fabsf(y) < FLT_EPSILON); }
// zero the vector
void zero()
{

Loading…
Cancel
Save