AP_Math: fixed vector inequality test

many thanks to cat888

fixes issue #2039
This commit is contained in:
Andrew Tridgell 2015-04-01 20:39:30 -07:00
parent 912a5d80b1
commit 728dbf24db
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ bool Vector2<T>::operator ==(const Vector2<T> &v) const
template <typename T>
bool Vector2<T>::operator !=(const Vector2<T> &v) const
{
return (x!=v.x && y!=v.y);
return (x!=v.x || y!=v.y);
}
template <typename T>

View File

@ -333,7 +333,7 @@ bool Vector3<T>::operator ==(const Vector3<T> &v) const
template <typename T>
bool Vector3<T>::operator !=(const Vector3<T> &v) const
{
return (x!=v.x && y!=v.y && z!=v.z);
return (x!=v.x || y!=v.y || z!=v.z);
}
template <typename T>