public void AbsoluteStatic() { Vector2D v = new Vector2D(-1, -2); Vector2D absoluteV = Vector2D.Absolute(v); Assert.AreEqual(1, absoluteV.X); Assert.AreEqual(2, absoluteV.Y); v = new Vector2D(1, 2); absoluteV = Vector2D.Absolute(v); Assert.AreEqual(1, absoluteV.X); Assert.AreEqual(2, absoluteV.Y); }
public void Absolute() { Vector2D v = new Vector2D(-1, -2); v.Absolute(); Assert.AreEqual(1, v.X); Assert.AreEqual(2, v.Y); v = new Vector2D(1, 2); v.Absolute(); Assert.AreEqual(1, v.X); Assert.AreEqual(2, v.Y); }