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