Truncate() 공개 메소드

public Truncate ( double max ) : void
max double
리턴 void
        /// <summary>
        ///  Calculates the overall steering force based on the currently active
        ///  steering behaviors.
        /// </summary>
        /// <returns></returns>
        public Vector2D CalculateSteeringForce()
        {
            //reset the force
            _steeringForce.Zero();

            //this will hold the value of each individual steering force
            _steeringForce = sumForces();

            //make sure the force doesn't exceed the vehicles maximum allowable
            _steeringForce.Truncate(_player.MaxForce);

            return(_steeringForce);
        }
        /// <summary>
        ///  Calculates the overall steering force based on the currently active
        ///  steering behaviors. 
        /// </summary>
        /// <returns></returns>
        public Vector2D CalculateSteeringForce()
        {
            //reset the force
            _steeringForce.Zero();

            //this will hold the value of each individual steering force
            _steeringForce = sumForces();

            //make sure the force doesn't exceed the vehicles maximum allowable
            _steeringForce.Truncate(_player.MaxForce);

            return _steeringForce;
        }