Added function to calculate the distance between systems.

This commit is contained in:
2013-11-11 21:26:21 +00:00
parent 813358271d
commit 360959dab1
2 changed files with 18 additions and 1 deletions

6
evesde/utils.py Normal file
View File

@@ -0,0 +1,6 @@
from math import sqrt
def euclidean_distance(origin, destination):
"""Calculates the Euclidean distance of two sets of x/y/z tuples"""
return sqrt(sum((a - b)**2 for a, b in zip(origin, destination)))