double sd10 = m01*m22 - m21*m02;
double sd20 = m01*m12 - m11*m02;
double det = m00*sd00 + m20*sd20 - m10*sd10;
if (Math.abs(det) == 0f) {
// determinant is zero; matrix is not invertible
throw new SingularMatrixException(this.toString());
}
double rdet = 1f / det;
return result.set(+sd00 * rdet,
-(m10*m22 - m20*m12) * rdet,
+(m10*m21 - m20*m11) * rdet,