DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
calculate the distance between two points
def dist(p1,p2): return math.sqrt(((p1[0] - p2[0]) ** 2) + ((p1[1] - p2[1]) ** 2))
PREVIOUS
NEXT
Tagged:
#calculate
#distance
#points
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit