determinant function

double determinant(
  1. List<double> a
)

Calculates the determinant of a mat2

@param {ReadonlyMat2} a the source matrix @returns {Number} determinant of a

Implementation

double determinant(List<double> a) {
  return a[0] * a[3] - a[2] * a[1];
}