AP_Math: added equality operator for VectorN

This commit is contained in:
Andrew Tridgell 2014-01-24 10:37:08 +11:00
parent e5e04d65ee
commit 0d174db05b

View File

@ -46,6 +46,14 @@ public:
return _v[i];
}
// test for equality
bool operator ==(const VectorN<T,N> &v) const {
for (uint8_t i=0; i<N; i++) {
if (_v[i] != v[i]) return false;
}
return true;
}
// zero the vector
inline void zero()
{