From 27e6c3eb395b79b334c52db1ef585d3c8cf89536 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Mon, 21 Nov 2011 16:47:13 +0000 Subject: [PATCH] *= fixed --- vcg/math/deprecated_matrix33.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vcg/math/deprecated_matrix33.h b/vcg/math/deprecated_matrix33.h index b1941275..f12489b3 100644 --- a/vcg/math/deprecated_matrix33.h +++ b/vcg/math/deprecated_matrix33.h @@ -244,11 +244,12 @@ public: /// Modificatore prodotto per matrice void operator *=( const Matrix33< S> & t ) { + Matrix33 r; int i,j; for(i=0;i<3;++i) for(j=0;j<3;++j) - (*this)[i][j] = (*this)[i][0]*t[0][j] + (*this)[i][1]*t[1][j] + (*this)[i][2]*t[2][j]; - + r[i][j] = (*this)[i][0]*t[0][j] + (*this)[i][1]*t[1][j] + (*this)[i][2]*t[2][j]; + for(i=0;i<9;++i) this->a[i] = r.a[i]; } /// Dot product with a diagonal matrix @@ -267,11 +268,13 @@ public: /// Dot product modifier with a diagonal matrix void operator *=( const Matrix33Diag< S> & t ) { + Matrix33 r; int i,j; for(i=0;i<3;++i) for(j=0;j<3;++j) - (*this)[i][j] = (*this)[i][j]*t[j]; - } + r[i][j] = (*this)[i][j]*t[j]; + for(i=0;i<9;++i) this->a[i] = r.a[i]; + } /// Modificatore prodotto per costante Matrix33 & operator *= ( const S t )