Prerequisites
Determinants are explained here:
Description
The value of the determinant for a 3×3 matrix is:
det = m11 m22 m33 + m12 m23 m31 + m13 m21 m32 - m11 m23 m32 - m12 m 21 m33
- m13 m22 m31
The following calculator allows you to calculate the determinant for a 3×3 matrix. Enter the values into the matrix and then press "calc det ->" to display the result:
Code
// assumes matrix indices start from 0 (0,1 and 2)
public double determinant() {
double value =
m00*m11*m22 + m01*m12*m20 + m02*m10*m21 - m00*m12*m21 - m01*m10*m22 - m02*m11*m20;
return value;
}
Further Information
Book Shop - Further reading.
Where I can, I have put links to Amazon for books that are relevant to
the subject, click on the appropriate country flag to get more details
of the book or to buy it from them.
cover
Developing Games in Java
Other Math Books
This site may have errors. Don't use for critical systems.