public boolean invert(){
  float determinant=determinant();
  if (Math.abs(determinant) <= Float.MIN_VALUE) {
    return false;
  }
  float t00=m00;
  float t01=m01;
  float t02=m02;
  float t10=m10;
  float t11=m11;
  float t12=m12;
  m00=t11 / determinant;
  m10=-t10 / determinant;
  m01=-t01 / determinant;
  m11=t00 / determinant;
  m02=(t01 * t12 - t11 * t02) / determinant;
  m12=(t10 * t02 - t00 * t12) / determinant;
  return true;
}

public boolean invert ( ) { float determinant = determinant ( ) ; if ( Math . abs ( determinant ) <= Float . MIN_VALUE ) { return false ; } float t00 = m00 ; float t01 = m01 ; float t02 = m02 ; float t10 = m10 ; float t11 = m11 ; float t12 = m12 ; m00 = t11 / determinant ; m10 = - t10 / determinant ; m01 = - t01 / determinant ; m11 = t00 / determinant ; m02 = ( t01 * t12 - t11 * t02 ) / determinant ; m12 = ( t10 * t02 - t00 * t12 ) / determinant ; return true ; }
invert this matrix . implementation stolen from openjdk .
