Answers for "math find heading to a point"

1

math find heading to a point

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)
Posted by: Guest on March-22-2020

Code answers related to "math find heading to a point"

Browse Popular Code Answers by Language