public void negative_values_produce_same_magnitude() { var vector = new VectorD(3); vector.Set(0, 3); vector.Set(1, -4); vector.Set(2, 5); var expected = vector.GetMagnitude(); var actual = vector.GetNegative().GetMagnitude(); Assert.Equal(expected, actual); }
public void can_get_negative_vector() { var source = new VectorD(2); source.Set(0, 1.5); source.Set(1, -6); var expected = new VectorD(2); expected.Set(0, -1.5); expected.Set(1, 6); var actual = source.GetNegative(); Assert.Equal(expected, actual); }