public void Vector2MaxTest() { Vector2 a = new Vector2(-1.0f, 4.0f); Vector2 b = new Vector2(2.0f, 1.0f); Vector2 expected = new Vector2(2.0f, 4.0f); Vector2 actual; actual = Vector2.Max(a, b); Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Max did not return the expected value."); }
public void Vector2MinMaxCodeCoverageTest() { Vector2 min = new Vector2(0, 0); Vector2 max = new Vector2(1, 1); Vector2 actual; // Min. actual = Vector2.Min(min, max); Assert.Equal(actual, min); actual = Vector2.Min(max, min); Assert.Equal(actual, min); // Max. actual = Vector2.Max(min, max); Assert.Equal(actual, max); actual = Vector2.Max(max, min); Assert.Equal(actual, max); }