Fix matrix operator bug on - and /.2

This commit is contained in:
Krad
2023-04-21 15:32:09 +08:00
parent b323ef5c0f
commit df36096f72
3 changed files with 10 additions and 10 deletions

View File

@@ -111,7 +111,7 @@ namespace Aurora {
friend Matrix& operator+(Matrix &&matrix,double aScalar);
Matrix operator+(const Matrix &matrix) const;
Matrix operator+(Matrix &&matrix) const;
friend Matrix operator+(Matrix &&aMatrix,const Matrix &aOther);
friend Matrix operator+(Matrix &&aMatrix,Matrix &aOther);
// sub
Matrix operator-(double aScalar) const;
@@ -120,7 +120,7 @@ namespace Aurora {
friend Matrix& operator-(Matrix &&matrix,double aScalar);
Matrix operator-(const Matrix &matrix) const;
Matrix operator-(Matrix &&matrix) const;
friend Matrix operator-(Matrix &&aMatrix,const Matrix &aOther);
friend Matrix operator-(Matrix &&aMatrix,Matrix &aOther);
// mul
Matrix operator*(double aScalar) const;
@@ -129,7 +129,7 @@ namespace Aurora {
friend Matrix& operator*(Matrix &&matrix,double aScalar);
Matrix operator*(const Matrix &matrix) const;
Matrix operator*(Matrix &&matrix) const;
friend Matrix operator*(Matrix &&aMatrix,const Matrix &aOther);
friend Matrix operator*(Matrix &&aMatrix,Matrix &aOther);
// div
Matrix operator/(double aScalar) const;
@@ -138,7 +138,7 @@ namespace Aurora {
friend Matrix& operator/(Matrix &&matrix,double aScalar);
Matrix operator/(const Matrix &matrix) const;
Matrix operator/(Matrix &&matrix) const;
friend Matrix operator/(Matrix &&aMatrix,const Matrix &aOther);
friend Matrix operator/(Matrix &&aMatrix, Matrix &aOther);
// pow
Matrix operator^(int times) const;