Skip to content

Instantly share code, notes, and snippets.

@peter-stratton
Created October 11, 2014 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter-stratton/77a37b473f142d450b71 to your computer and use it in GitHub Desktop.
Save peter-stratton/77a37b473f142d450b71 to your computer and use it in GitHub Desktop.
XYZ coordinate distance calculation
import math
x1,y1,z1 = 5.0,6.7,1.5
x2,y2,z2 = 4.0,1.2,1.6
distance = math.sqrt((x2-x1)**2+(y2-y1)**2+(z2 -z1)**2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment