Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

distance formula in python

import math.
def calculateDistance(x1,y1,x2,y2):
dist = math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
return dist.
print calculateDistance(x1, y1, x2, y2)
 
PREVIOUS NEXT
Tagged: #distance #formula #python
ADD COMMENT
Topic
Name
2+5 =