예제 #1
0
Matrix3x3 Matrix3x3::operator*(const double &right) const
{
	Matrix3x3 ret = *this;
	for (unsigned int iRow = 0; iRow < 3; iRow++)
	{
		for (unsigned int iCol = 0; iCol < 3; iCol++)
		{
			ret.SetCell(iRow,iCol, right * m_dValues[iRow][iCol]);
		}
	}
	return ret;
}
예제 #2
0
Matrix3x3 Matrix3x3::operator*(const Matrix3x3 &right) const
{
	Matrix3x3 ret;
	for (unsigned int iRow = 0; iRow < 3; iRow++)
	{
		for (unsigned int iCol = 0; iCol < 3; iCol++)
		{
			ret.SetCell(iRow, iCol, this->GetRow(iRow) * right.GetColumn(iCol));
		}
	}
	return ret;
}
예제 #3
0
Matrix3x3& Matrix3x3::operator*=(const Matrix3x3 &right)
{
	Matrix3x3 temp;
	for (unsigned int iRow = 0; iRow < 3; iRow++)
	{
		for (unsigned int iCol = 0; iCol < 3; iCol++)
		{
			temp.SetCell(iRow, iCol, this->GetRow(iRow) * right.GetColumn(iCol));
		}
	}
	*this = temp;
	return *this;
}