public void Vector2LerpTest5() { Vector2 a = new Vector2(45.67f, 90.0f); Vector2 b = new Vector2(Single.PositiveInfinity, Single.NegativeInfinity); Single t = 0.408f; Vector2 actual = Vector2.Lerp(a, b, t); Assert.True(Single.IsPositiveInfinity(actual.X), "Vector2f.Lerp did not return the expected value."); Assert.True(Single.IsNegativeInfinity(actual.Y), "Vector2f.Lerp did not return the expected value."); }
public void Vector2LerpTest4() { Vector2 a = new Vector2(0.0f, 0.0f); Vector2 b = new Vector2(3.18f, 4.25f); Single t = -2.0f; Vector2 expected = -(b * 2.0f); Vector2 actual = Vector2.Lerp(a, b, t); Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Lerp did not return the expected value."); }
public void Vector2LerpTest6() { Vector2 a = new Vector2(1.0f, 2.0f); Vector2 b = new Vector2(1.0f, 2.0f); Single t = 0.5f; Vector2 expected = new Vector2(1.0f, 2.0f); Vector2 actual = Vector2.Lerp(a, b, t); Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Lerp did not return the expected value."); }