diff --git a/libraries/AP_Math/vector2.cpp b/libraries/AP_Math/vector2.cpp index 096d2e93ac..d8dd97bc88 100644 --- a/libraries/AP_Math/vector2.cpp +++ b/libraries/AP_Math/vector2.cpp @@ -119,7 +119,7 @@ bool Vector2::operator ==(const Vector2 &v) const template bool Vector2::operator !=(const Vector2 &v) const { - return (x!=v.x && y!=v.y); + return (x!=v.x || y!=v.y); } template diff --git a/libraries/AP_Math/vector3.cpp b/libraries/AP_Math/vector3.cpp index ae5399df32..8dfeff7f17 100644 --- a/libraries/AP_Math/vector3.cpp +++ b/libraries/AP_Math/vector3.cpp @@ -333,7 +333,7 @@ bool Vector3::operator ==(const Vector3 &v) const template bool Vector3::operator !=(const Vector3 &v) const { - return (x!=v.x && y!=v.y && z!=v.z); + return (x!=v.x || y!=v.y || z!=v.z); } template