title: Python : Difficulty finding direction from 1 point to another
body: <p>I am trying to make a orbit simulator in Python and i have some basic mechanics like acceleration , velocity implemented.<br>
  I was trying to implement Newtonian gravitational formula <code>GMm/r**2</code><br>
  But there to calculate the direction of the force im doing something like this <br>
  <code>dir = Vec2(object.posX-object2.posX,object.posY-object2.posY)</code><br>
  and then applying the <code>math.atan</code> function to convert the slope into angle<br>
  <code>dir_angle = math.atan(dir.y/dir.x)</code><br>
  This is later used to calculate the X and Y direction component of force as acceleration <br></p>
  <pre><code>object2.acceleration_x = dt * f * math.sin(dir_angle)/object2.mass
  object2.acceleration_y = dt * f * math.cos(dir_angle)/object2.mass
  </code></pre>
  <p>But value of <code>dir.x</code> and <code>dir.y</code> initially is <code>-100,100</code><br>
  so atan is <code>-.78</code> but eventually , the <code>dirx</code> and <code>diry</code> become <code>1,-1</code>.<br>But the slope remains the same and the angle remains the same , not reversing the direction of force.<br> How can i fix this so the force can change direction when I want.</p>