bool Matrix3x3f::operator==(const Matrix3x3f &other) const { for(int i = 0; i < 4; i++) for(int j = 0; j < 4; j++) { if(Get(i, j) != other.Get(i, j)) return false; } return true; }
Matrix3x3f Matrix3x3f::operator*(const Matrix3x3f &other) const { Matrix3x3f product; for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) { float sum = 0.0f; // jth row of this by ith column of other for(int d = 0; d < 3; d++) sum += Get(d, j) * other.Get(i, d); product.Set(i, j, sum); } return product; }