public void Simple() { var vector = new VectorN(3); vector[0] = 23; vector[1] = -21; vector[2] = 4; vector.Normalize(); Assert.AreEqual(1, vector.Magnitude()); }
public void Simple() { var vector = new VectorN(3); vector.SetValues(4, 3, 12); Assert.AreEqual(13, vector.Magnitude()); Assert.AreEqual(4, vector[0]); Assert.AreEqual(3, vector[1]); Assert.AreEqual(12, vector[2]); }