public void negative_dimension_throws() { var v = new Vector4F(); Assert.Throws <ArgumentOutOfRangeException>(() => v.Set(-1, 0.0f)); Assert.Throws <ArgumentOutOfRangeException>(() => v.Set(int.MinValue, 0.0f)); }
public void large_dimension_throws() { var v = new Vector4F(); Assert.Throws <ArgumentOutOfRangeException>(() => v.Set(4, 0.0f)); Assert.Throws <ArgumentOutOfRangeException>(() => v.Set(int.MaxValue, 0.0f)); }
public void can_set_all_componenets() { var v = new Vector4F(1.0f, 2, 3, 4); v.Set(0, -1.0f); v.Set(1, 5.0f); v.Set(2, -0.5f); v.Set(3, 0.1f); Assert.Equal(-1.0f, v.Get(0)); Assert.Equal(5.0f, v.Get(1)); Assert.Equal(-0.5f, v.Get(2)); Assert.Equal(0.1f, v.Get(3)); }