determinant33 static method

double determinant33(
  1. Float32List matrix,
  2. int offset
)

Compute the determinant of the upper 3x3 of the 4x4 matrix starting at offset.

Implementation

static double determinant33(Float32List matrix, int offset) {
  final m0 = matrix[0 + offset];
  final m1 = matrix[1 + offset];
  final m2 = matrix[2 + offset];
  final m4 = matrix[4 + offset];
  final m5 = matrix[5 + offset];
  final m6 = matrix[6 + offset];
  final m8 = matrix[8 + offset];
  final m9 = matrix[9 + offset];
  final m10 = matrix[10 + offset];
  final x = m0 * ((m5 * m10) - (m6 * m8));
  final y = m1 * ((m4 * m10) - (m6 * m8));
  final z = m2 * ((m4 * m9) - (m5 * m8));
  return x - y + z;
}