Created
October 11, 2014 18:23
-
-
Save peter-stratton/77a37b473f142d450b71 to your computer and use it in GitHub Desktop.
XYZ coordinate distance calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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