invert method

double invert ()

Invert the matrix. Returns the determinant.

Implementation

double invert() {
  final double det = determinant();
  if (det == 0.0) {
    return 0.0;
  }
  final double invDet = 1.0 / det;
  final double temp = _m2storage[0];
  _m2storage[0] = _m2storage[3] * invDet;
  _m2storage[1] = -_m2storage[1] * invDet;
  _m2storage[2] = -_m2storage[2] * invDet;
  _m2storage[3] = temp * invDet;
  return det;
}