Matrix33: make const the binary operators

This commit is contained in:
Paolo Cignoni 2008-10-24 12:20:44 +00:00
parent 4783ac9a62
commit 24ea4251a9
1 changed files with 39 additions and 39 deletions

View File

@ -282,7 +282,7 @@ public:
}
/// Operatore prodotto per costante
Matrix33 operator * ( const S t )
Matrix33 operator * ( const S t ) const
{
Matrix33<S> r;
for(int i=0;i<9;++i)
@ -292,7 +292,7 @@ public:
}
/// Operatore sottrazione per matrici 3x3
Matrix33 operator - ( const Matrix33 &m )
Matrix33 operator - ( const Matrix33 &m ) const
{
Matrix33<S> r;
for(int i=0;i<9;++i)
@ -302,7 +302,7 @@ public:
}
/// Operatore sottrazione di matrici 3x3 con matrici diagonali
Matrix33 operator - ( const Matrix33Diag<S> &p )
Matrix33 operator - ( const Matrix33Diag<S> &p ) const
{
Matrix33<S> r=a;
r[0][0] -= p[0];
@ -312,7 +312,7 @@ public:
}
/// Operatore sottrazione per matrici 3x3
Matrix33 operator + ( const Matrix33 &m )
Matrix33 operator + ( const Matrix33 &m ) const
{
Matrix33<S> r;
for(int i=0;i<9;++i)
@ -322,7 +322,7 @@ public:
}
/// Operatore addizione di matrici 3x3 con matrici diagonali
Matrix33 operator + ( const Matrix33Diag<S> &p )
Matrix33 operator + ( const Matrix33Diag<S> &p ) const
{
Matrix33<S> r=(*this);
r[0][0] += p[0];