import math def get_heading_to(x2, y2): x1 = 0 y1 = 0 print(math.atan2(-x2, -y2)) # atan2 is also known as the tangent function with 2 variables get_heading_to(100, 100)