48 float det = a11 * a22 - a12 * a21;
54 x.
x = det * (a22 * b.
x - a12 * b.
y);
55 x.
y = det * (a11 * b.
y - a21 * b.
x);
63 float det = a *
d - b * c;
69 M->
ex.
x = det *
d; M->
ey.
x = -det * b; M->
ex.
z = 0.0f;
70 M->
ex.
y = -det * c; M->
ey.
y = det * a; M->
ey.
z = 0.0f;
71 M->
ez.
x = 0.0f; M->
ez.
y = 0.0f; M->
ez.
z = 0.0f;
84 float a22 =
ey.
y, a23 =
ez.
y;
87 M->
ex.
x = det * (a22 * a33 - a23 * a23);
88 M->
ex.
y = det * (a13 * a23 - a12 * a33);
89 M->
ex.
z = det * (a12 * a23 - a13 * a22);
92 M->
ey.
y = det * (a11 * a33 - a13 * a13);
93 M->
ey.
z = det * (a13 * a12 - a11 * a23);
97 M->
ez.
z = det * (a11 * a22 - a12 * a12);
float b2Dot(const b2Vec2 &a, const b2Vec2 &b)
Perform the dot product on two vectors.
void GetSymInverse33(b2Mat33 *M) const
Returns the zero matrix if singular.
A 2D column vector with 3 elements.
const b2Vec2 b2Vec2_zero(0.0f, 0.0f)
Useful constant.
float b2Cross(const b2Vec2 &a, const b2Vec2 &b)
Perform the cross product on two vectors. In 2D this produces a scalar.
b2Vec3 Solve33(const b2Vec3 &b) const
A 3-by-3 matrix. Stored in column-major order.
b2Vec2 Solve22(const b2Vec2 &b) const
void GetInverse22(b2Mat33 *M) const