Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get angle between two points

from math import atan2, degrees, radians

def get_angle(point_1, point_2): #These can also be four parameters instead of two arrays
    angle = atan_2(point_1[1] - point_2[1], point_1[0] - point_2[0])
    
    #Optional
    angle = degrees(angle)
    
    # OR
    angle = radians(angle)
    
    return angle
 
PREVIOUS NEXT
Tagged: #python #angle #points
ADD COMMENT
Topic
Name
9+6 =