public void TestStraightPreviousTrackSegmentChanged() { Straight straight = new Straight(previous, 5f, 1f); previous.TrySetEndDirection(v3); Assert.IsTrue(straight.EndPoint.Equals(v3, (float)1E-5)); previous.TrySetEndDirection(v1); //make sure the old value is restored for other tests }
public void TestCurvePreviousTrackSegmentChanged() { Curve curve = new Curve(previous, 5f, v2); previous.TrySetEndDirection(v3); previous.EndPoint = p1; Assert.IsTrue(curve.EndPoint.Equals(new Vector2(-1, 2), (float)1E-5)); previous.TrySetEndDirection(v1); }