Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/api/Math.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/Math.py')
-rw-r--r--src/api/Math.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/Math.py b/src/api/Math.py
index 41d67ae..a86b5b5 100644
--- a/src/api/Math.py
+++ b/src/api/Math.py
@@ -49,6 +49,9 @@ def degToRad(aAngle):
def dist(ax1, ay1, ax2, ay2):
return math.sqrt((ax2-ax1)**2 + (ay2-ay1)**2)
+def distVec(a, b):
+ return math.sqrt((a.x-b.x)**2 + (a.y-b.y)**2)
+
# determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs.
# http://www.ariel.com.au/a/python-point-int-poly.html