Game Development Reference
In-Depth Information
Matrix3x3& operator+=(Matrix3x3 m);
Matrix3x3& operator-=(Matrix3x3 m);
Matrix3x3& operator*=(float s);
Matrix3x3& operator/=(float s);
};
// Constructor
inline Matrix3x3::Matrix3x3(void)
{
e11 = 0;
e12 = 0;
e13 = 0;
e21 = 0;
e22 = 0;
e23 = 0;
e31 = 0;
e32 = 0;
e33 = 0;
}
// Constructor
inline Matrix3x3::Matrix3x3(float r1c1, float r1c2, float r1c3,
float r2c1, float r2c2, float r2c3,
float r3c1, float r3c2, float r3c3 )
{
e11 = r1c1;
e12 = r1c2;
e13 = r1c3;
e21 = r2c1;
e22 = r2c2;
e23 = r2c3;
e31 = r3c1;
e32 = r3c2;
e33 = r3c3;
}
Determinant
The method, det , returns the determinant of the matrix. The determinant of a 2×2
matrix:
is as follows:
det [m] = e 11 e 22 − e 21 e 12
Search Nedrilad ::




Custom Search