diff --git a/src/Matrix.cpp b/src/Matrix.cpp index 53447d8..b4ef6c7 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -472,7 +472,7 @@ namespace Aurora { } //operation - Matrix Matrix::operator-(double aScalar) const { return operatorMxA(&vdSubI, aScalar, *this);} - Matrix operator-(double aScalar, const Matrix &matrix) {return matrix - aScalar;} + Matrix operator-(double aScalar, const Matrix &matrix) {return operatorAxM(&vdSubI, aScalar, matrix);} Matrix Matrix::operator-(const Matrix &aMatrix) const { if (isScalar()){ return getScalar()-aMatrix; @@ -546,7 +546,7 @@ namespace Aurora { } //operation / Matrix Matrix::operator/(double aScalar) const { return operatorMxA(&vdDivI, aScalar, *this);} - Matrix operator/(double aScalar, const Matrix &matrix) {return matrix / aScalar;} + Matrix operator/(double aScalar, const Matrix &matrix) {return operatorAxM(&vdDivI, aScalar, matrix);} Matrix Matrix::operator/(const Matrix &aMatrix) const { if (isScalar()){ return getScalar()/aMatrix; @@ -557,7 +557,7 @@ namespace Aurora { return operatorMxM(vdDivI, vzDivI, *this, aMatrix); } Matrix &operator/(double aScalar, Matrix &&matrix) { - return operatorMxA_RR(&vdDivI,aScalar, std::forward(matrix)); + return operatorAxM_RR(&vdDivI,aScalar, std::forward(matrix)); } Matrix &operator/(Matrix &&matrix,double aScalar) { return operatorMxA_RR(&vdDivI,aScalar, std::forward(matrix));