public void can_normalize_sample() { var vector = new VectorF(new[] { 3.0f, 4, 5, -6 }); var expected = vector.GetQuotient(vector.GetMagnitude()); var actual = vector.GetNormal(); Assert.Equal(expected, actual); }
public void source_vector_is_unchanged() { var actual = new VectorF(2); actual.Set(0, 4.5f); actual.Set(1, 888f); var expected = new VectorF(actual); var result = actual.GetQuotient(2); Assert.Equal(expected, actual); }
public void can_get_quotient_vector() { var source = new VectorF(2); source.Set(0, 4.5f); source.Set(1, 888f); var expected = new VectorF(2); expected.Set(0, 4.5f / 4.0f); expected.Set(1, 888f / 4.0f); var actual = source.GetQuotient(4); Assert.Equal(expected, actual); }