determinant33 method
Compute the determinant of the upper 3x3 of the 4x4 matrix
starting at
offset
.
Implementation
static double determinant33(Float32List matrix, int offset) {
final double m0 = matrix[0 + offset];
final double m1 = matrix[1 + offset];
final double m2 = matrix[2 + offset];
final double m4 = matrix[4 + offset];
final double m5 = matrix[5 + offset];
final double m6 = matrix[6 + offset];
final double m8 = matrix[8 + offset];
final double m9 = matrix[9 + offset];
final double m10 = matrix[10 + offset];
final double x = m0 * ((m5 * m10) - (m6 * m8));
final double y = m1 * ((m4 * m10) - (m6 * m8));
final double z = m2 * ((m4 * m9) - (m5 * m8));
return x - y + z;
}