title: Arrival function
body: <p>I am struggling a lot with this assignment I am doing. I have been trying to do it for a few weeks and can't figure out how to make further progress on this. I need to make an arrival function for AI. I can't figure out what the equation is for distance in order to continue making this function. Here is what I have so far for it.</p>
  
  <pre><code>void Steering::Arrival( sf::Vector2f position, sf::Vector2f target, float maxSpeed, float maxAcceleration, float timeToTarget, float slowRadius, float targetRadius, double distance, SteeringOutput&amp; steering )
  {
      timeToTarget = 0.1;
  
      steering.linear = target - position;
      MathHelper::Normalize( steering.linear );
      distance = 
  
      //Check if arrived at target
      if (timeToTarget &lt; targetRadius)
      {
          return;
      }
  
      //Check if we are out of the slowRadius
      if (timeToTarget &gt; slowRadius)
          target = maxSpeed;
  
  }
  </code></pre>
  
  <p>It gets cut off there because I know I'm not doing something right, I just can't figure out what it is. I'm sure more information is needed to help me at all but I'm not sure what information is necessary so please just let me know what else is needed.</p>