BOSS 7.1.0
BESIII Offline Software System
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mdcTwoInv.h
Go to the documentation of this file.
1inline int mdcTwoInv( double matrix[3], double invmat[3]) {
2
3 double det = matrix[0] * matrix[2] - matrix[1] * matrix[1];
4 if (det == 0.0) {
5 invmat[0] = invmat[2] = invmat[1] = 0.00000;
6 return 1;
7 }
8 else {
9 double detinv = 1./det;
10 invmat[0] = matrix[2] * detinv;
11 invmat[2] = matrix[0] * detinv;
12 invmat[1] = -matrix[1] * detinv;
13 return 0;
14 }
15}
16
int mdcTwoInv(double matrix[3], double invmat[3])
Definition: mdcTwoInv.h:1