public void can_normalize_sample() { var actual = new Vector4F(3.0f, 4, 5, -6); var expected = actual.GetQuotient(actual.GetMagnitude()); actual.Normalize(); Assert.Equal(expected, actual); }
public void can_get_quotient_vector() { var source = new Vector4F(3.0f, -2, 8, 1.5f); var expected = new Vector4F(3.0f / 4.0f, -2.0f / 4.0f, 8.0f / 4.0f, 1.5f / 4.0f); var actual = source.GetQuotient(4); Assert.Equal(expected, actual); }
public void source_vector_is_unchanged() { var actual = new Vector4F(1.0f, 2, 3, 4); var expected = new Vector4F(actual); var result = actual.GetQuotient(2); Assert.Equal(expected, actual); }
public void op_multiply_scalar_mimics_divide() { var vector = new Vector4F(1.0f, 2, 3, 4); var divisor = 2.4f; var expected = vector.GetQuotient(divisor); var actual = vector / divisor; Assert.Equal(expected, actual); }