public void unit_axis_vector_normalizes_to_self() { var actual = VectorF.CreateUnit(4, 2); var expected = new VectorF(actual); actual.Normalize(); Assert.Equal(expected, actual); }
public void unit_axis_vector_normalizes_to_self() { var vector = VectorF.CreateUnit(5, 1); var expected = new VectorF(vector); var actual = vector.GetNormal(); Assert.Equal(expected, actual); }
public void can_create_axis_unit_vector(int size, int dimension) { var expected = new VectorF(size); expected.Set(dimension, 1.0f); var actual = VectorF.CreateUnit(size, dimension); Assert.Equal(expected, actual); }
public void create_axis_unit_vector_with_bad_size_throws(int size) { Assert.Throws <ArgumentOutOfRangeException>(() => VectorF.CreateUnit(size, 0)); }