17 template <
typename Real>
21 template <
typename Real>
23 bool* reportInvertibility =
nullptr);
25 template <
typename Real>
28 template <
typename Real>
31 template <
typename Real>
35 template <
typename Real>
40 Real c00 = M(1, 1)*M(2, 2) - M(1, 2)*M(2, 1);
41 Real c10 = M(1, 2)*M(2, 0) - M(1, 0)*M(2, 2);
42 Real c20 = M(1, 0)*M(2, 1) - M(1, 1)*M(2, 0);
43 Real det = M(0, 0)*c00 + M(0, 1)*c10 + M(0, 2)*c20;
46 Real invDet = ((Real)1) / det;
50 (M(0, 2)*M(2, 1) - M(0, 1)*M(2, 2))*invDet,
51 (M(0, 1)*M(1, 2) - M(0, 2)*M(1, 1))*invDet,
53 (M(0, 0)*M(2, 2) - M(0, 2)*M(2, 0))*invDet,
54 (M(0, 2)*M(1, 0) - M(0, 0)*M(1, 2))*invDet,
56 (M(0, 1)*M(2, 0) - M(0, 0)*M(2, 1))*invDet,
57 (M(0, 0)*M(1, 1) - M(0, 1)*M(1, 0))*invDet
67 if (reportInvertibility)
69 *reportInvertibility = invertible;
74 template <
typename Real>
79 M(1, 1)*M(2, 2) - M(1, 2)*M(2, 1),
80 M(0, 2)*M(2, 1) - M(0, 1)*M(2, 2),
81 M(0, 1)*M(1, 2) - M(0, 2)*M(1, 1),
82 M(1, 2)*M(2, 0) - M(1, 0)*M(2, 2),
83 M(0, 0)*M(2, 2) - M(0, 2)*M(2, 0),
84 M(0, 2)*M(1, 0) - M(0, 0)*M(1, 2),
85 M(1, 0)*M(2, 1) - M(1, 1)*M(2, 0),
86 M(0, 1)*M(2, 0) - M(0, 0)*M(2, 1),
87 M(0, 0)*M(1, 1) - M(0, 1)*M(1, 0)
91 template <
typename Real>
94 Real c00 = M(1, 1)*M(2, 2) - M(1, 2)*M(2, 1);
95 Real c10 = M(1, 2)*M(2, 0) - M(1, 0)*M(2, 2);
96 Real c20 = M(1, 0)*M(2, 1) - M(1, 1)*M(2, 0);
97 Real det = M(0, 0)*c00 + M(0, 1)*c10 + M(0, 2)*c20;
101 template <
typename Real>
104 Real trace = M(0, 0) + M(1, 1) + M(2, 2);
Matrix2x2< Real > Adjoint(Matrix2x2< Real > const &M)
Real Trace(Matrix2x2< Real > const &M)
Quaternion< Real > Inverse(Quaternion< Real > const &d)
Real Determinant(GMatrix< Real > const &M)