public void SumTestF() { var list = new VSArray <float>(new[] { 1.0f, 0.0f, 4.0f, 3.0f, 2.0f }); var value = list.Sum(); Assert.That(value, Is.EqualTo(10.0f)); }
public void SumTestV() { var list = new VSArray <Vector3>(); list.Add(new Vector3(0, 0, 0)); list.Add(new Vector3(1, 2, 3)); list.Add(new Vector3(2, 4, 6)); list.Add(new Vector3(3, 6, 9)); list.Add(new Vector3(4, 8, 12)); var value = list.Sum(); Assert.That(value, Is.EqualTo(new Vector3(10, 20, 30))); }