Exemplo n.º 1
0
        public void GivenStepsSize_WhenCalculatingCoordinatesAtOneUnitTimeLater_ThenXZCoordinatesAreIncrementedByInitialTangentTimesStepsSize()
        {
            var coordinates = _arcHalfUnitStepSize.CalculateCoordinateAtTime(_initialTangent, 1, 1);

            var expectedX = _origin.position.x + 0.5f * _initialTangent.x;
            var expectedZ = _origin.position.z + 0.5f * _initialTangent.z;

            Assert.AreEqual(expectedX, coordinates.x, "X");
            Assert.AreEqual(expectedZ, coordinates.z, "Z");
        }
Exemplo n.º 2
0
        public void WhenRetrievingCoordinatesAtTimeZero_ThenCoordinatesShouldBeOrigin()
        {
            var coordinates = _arcUnitaryStepSize.CalculateCoordinateAtTime(Vector3.up, 1, 0);

            Assert.AreEqual(_origin.position, coordinates);
        }