Box2D.Common.Mat22.InvertToOut C# (CSharp) Method

InvertToOut() public method

public InvertToOut ( Mat22 result ) : void
result Mat22
return void
        public void InvertToOut(Mat22 result)
        {
            float a = Ex.X;
            float b = Ey.X;
            float c = Ex.Y;
            float d = Ey.Y;
            float det = a * d - b * c;
            // b2Assert(det != 0.0f);
            det = 1.0f / det;
            result.Ex.X = det * d;
            result.Ey.X = (-det) * b;
            result.Ex.Y = (-det) * c;
            result.Ey.Y = det * a;
        }