From 1244807f7e57c68601c77d2e4c9cb31ba9d9de78 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 26 Sep 2013 22:19:59 +0200 Subject: [PATCH] 0001256: Order of operations for Matrix is nonintuitive, needs documentation --- src/Base/Matrix.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Base/Matrix.cpp b/src/Base/Matrix.cpp index af6adcfbb..fa3a1f468 100644 --- a/src/Base/Matrix.cpp +++ b/src/Base/Matrix.cpp @@ -205,7 +205,7 @@ void Matrix4D::rotX (double fAngle) clMat.dMtrx4D[1][1] = fcos; clMat.dMtrx4D[2][2] = fcos; clMat.dMtrx4D[1][2] = -fsin; clMat.dMtrx4D[2][1] = fsin; - (*this) *= clMat; + (*this) = clMat * (*this); } void Matrix4D::rotY (double fAngle) @@ -218,7 +218,7 @@ void Matrix4D::rotY (double fAngle) clMat.dMtrx4D[0][0] = fcos; clMat.dMtrx4D[2][2] = fcos; clMat.dMtrx4D[2][0] = -fsin; clMat.dMtrx4D[0][2] = fsin; - (*this) *= clMat; + (*this) = clMat * (*this); } void Matrix4D::rotZ (double fAngle) @@ -231,7 +231,7 @@ void Matrix4D::rotZ (double fAngle) clMat.dMtrx4D[0][0] = fcos; clMat.dMtrx4D[1][1] = fcos; clMat.dMtrx4D[0][1] = -fsin; clMat.dMtrx4D[1][0] = fsin; - (*this) *= clMat; + (*this) = clMat * (*this); } void Matrix4D::rotLine (const Vector3d& rclVct, double fAngle)