title: How to get the angle between two vectors in pygame?
body: <p>I want my player to look towards some certain coordinates in pygame. I tried to do this by getting the angle between the position of the player and the coordinates and then rotating it the player by that angle. I used a function for this ,the function works properly when I need my player to look towards the coordinates of the mouse , but fails when i use the same function to make a zombie look towards the player.
  This was the function that is used.</p>
  <pre><code>def rotate_char(khiladi,vector,old_center,angle=False) :
  x1, y1 = vector
  x2, y2 = khiladi.pos
  dx, dy = x2 - x1, y2 - y1
  
  rads = atan2(dx, dy)
  degs = degrees(rads)
  
  r_khiladi = pygame.transform.rotate(khiladi.image, degs)
  
  R_k = r_khiladi.get_rect()
  R_k.center = old_center
  screen.blit(r_khiladi, (R_k))
  if angle : return degs 
  </code></pre>
  <p>I used another method that used numpy</p>
  <pre><code>v1_u = list(khiladi.pos / linalg.norm(khiladi.pos))
  v2_u = list(vector / linalg.norm(vector))
  v1_u[1] , v2_u[1] = -v1_u[1] , -v2_u[1]
  c_angle =  degrees(arccos(clip(dot(v1_u, v2_u), -1.0, 1.0)))
  </code></pre>
  <p>When I tried to print the angles they were totally off mark and didn't even showed any pattern.
  Please Help</p>