public void negative_dimension_throws() { var v = new Vector4F(); Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(-1)); Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(int.MinValue)); }
public void large_dimension_throws() { var v = new Vector4F(); Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(4)); Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(int.MaxValue)); }
public void can_get_all_componenets() { var v = new Vector4F(-1.0f, 5.0f, -0.5f, 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)); }
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)); }