Beispiel #1
0
        public void GetDistination_GivenTwoPositionsAlongThePath_ReturnsThirdDistination()
        {
            var path = new Vector3[]
            {
                new Vector3(0.0f, 0.0f, 0.0f),
                new Vector3(1.0f, 1.0f, 1.0f),
                new Vector3(2.0f, 2.0f, 2.0f),
                new Vector3(3.0f, 3.0f, 3.0f)
            };

            var pathFollower = new PathFollower(path);

            pathFollower.GetDistination(new Vector3(0.0f, 0.0f, 0.0f));
            var actual = pathFollower.GetDistination(new Vector3(1.0f, 1.0f, 1.0f));

            Assert.AreEqual(new Vector3(2.0f, 2.0f, 2.0f), actual);
        }