public void Invert() { Assert.AreEqual(Matrix22F.Identity, Matrix22F.Identity.Inverse); Matrix22F m = new Matrix22F(1, 2, 3, 4); Vector2F v = Vector2F.One; Vector2F w = m * v; Matrix22F im = m; im.Invert(); Assert.IsTrue(Vector2F.AreNumericallyEqual(v, im * w)); Assert.IsTrue(Matrix22F.AreNumericallyEqual(Matrix22F.Identity, m * im)); }
public void InvertException() { Matrix22F m = new Matrix22F(1, 2, 4, 8); m.Invert(); }