MATH: Add/fix matrix operators
- fix == operator - add != operator
This commit is contained in:
parent
243519b276
commit
cc9734643b
1 changed files with 8 additions and 1 deletions
|
@ -206,6 +206,9 @@ Matrix<r, c> operator-(const Matrix<r, c> &m);
|
|||
template <int r, int c>
|
||||
bool operator==(const Matrix<r, c> &m1, const Matrix<r, c> &m2);
|
||||
|
||||
template <int r, int c>
|
||||
bool operator!=(const Matrix<r, c> &m1, const Matrix<r, c> &m2);
|
||||
|
||||
|
||||
// Constructors
|
||||
template<int rows, int cols>
|
||||
|
@ -457,9 +460,13 @@ bool operator==(const Matrix<r, c> &m1, const Matrix<r, c> &m2) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <int r, int c>
|
||||
bool operator!=(const Matrix<r, c> &m1, const Matrix<r, c> &m2) {
|
||||
return !(m1 == m2);
|
||||
}
|
||||
|
||||
template<int r, int c>
|
||||
Common::Debug &operator<<(Common::Debug dbg, const Math::Matrix<r, c> &m) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue