summaryrefslogtreecommitdiff
path: root/geometry.py
diff options
context:
space:
mode:
Diffstat (limited to 'geometry.py')
-rw-r--r--geometry.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/geometry.py b/geometry.py
index d69add8..0fa1114 100644
--- a/geometry.py
+++ b/geometry.py
@@ -25,3 +25,7 @@ def is_colinear(points, epsilon=1):
return False
return True
+def angle_diff(alpha, beta):
+ result = (alpha-beta) % (2*math.pi)
+ if result > math.pi: result -= 2*math.pi
+ return result