public Mat22 GetInverse()
{
float a = Col1.x, b = Col2.x, c = Col1.y, d = Col2.y;
Mat22 B = new Mat22();
float det = a * d - b * c;
Box2DXDebug.Assert(det != 0.0f);
det = 1.0f / det;
B.Col1.x = det * d; B.Col2.x = -det * b;
B.Col1.y = -det * c; B.Col2.y = det * a;
return B;
}