- elif x1 == x2 and y1>y2:
- theta = 3.0 * math.pi / 2
- elif x1 == x2 and y2>y1:
- theta = math.pi / 2
- elif x2>x1 and y2 >= y1:
- theta = math.atan((y2-y1) / (x2-x1))
- elif x2<x1:
- theta = math.pi + math.atan((y2-y1) / (x2-x1))
- elif x2>x1 and y2<y1:
- theta = 2 * math.pi + math.atan((y2-y1) / (x2-x1))
+ elif x1 == x2 and y1 > y2:
+ theta = 3.0 * math.pi / 2.0
+ elif x1 == x2 and y2 > y1:
+ theta = math.pi / 2.0
+ elif x2 > x1 and y2 >= y1:
+ theta = math.atan((y2 - y1) / (x2 - x1))
+ elif x2 < x1:
+ theta = math.pi + math.atan((y2 - y1) / (x2 - x1))
+ elif x2 > x1 and y2 < y1:
+ theta = 2 * math.pi + math.atan((y2 - y1) / (x2 - x1))