AP_Math: compiler warnings: apply is_equal(float)

This commit is contained in:
Tom Pittenger 2015-05-01 23:49:51 -07:00 committed by Andrew Tridgell
parent c93c773de2
commit ac4e7b2b03
2 changed files with 4 additions and 4 deletions

View File

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

View File

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