def lineSlope(p1, p2):
slope = (p2[1] - p1[1]) / (p2[0] - p1[0])
return slope
def slopeAngle(p1, p2):
slope = lineSlope(p1, p2)
radian = np.arctan(slope)
return radian
def angleDegree(radian):
theta = int(radian * 180 / np.pi) % 360
return theta