Go to the source code of this file.
Functions | |
int | mdcTwoInv (double matrix[3], double invmat[3]) |
int mdcTwoInv | ( | double | matrix[3], | |
double | invmat[3] | |||
) | [inline] |
Definition at line 1 of file mdcTwoInv.h.
Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegGrouper::calcParBySegs(), MdcSegInfoSterO::calcStereo(), and MdcSegInfoCsmc::calcStraight().
00001 { 00002 00003 double det = matrix[0] * matrix[2] - matrix[1] * matrix[1]; 00004 if (det == 0.0) { 00005 invmat[0] = invmat[2] = invmat[1] = 0.00000; 00006 return 1; 00007 } 00008 else { 00009 double detinv = 1./det; 00010 invmat[0] = matrix[2] * detinv; 00011 invmat[2] = matrix[0] * detinv; 00012 invmat[1] = -matrix[1] * detinv; 00013 return 0; 00014 } 00015 }