Skip to content

Instantly share code, notes, and snippets.

@ddavaham
Created October 5, 2017 16:35
Show Gist options
  • Save ddavaham/03fe6c1135c93e025ab5fcafe888dace to your computer and use it in GitHub Desktop.
Save ddavaham/03fe6c1135c93e025ab5fcafe888dace to your computer and use it in GitHub Desktop.
Calculate the Distance between two points in space with x,y,z values
$distance = sqrt(pow($x2-$x1,2)+pow($y2-$y1,2)+pow($z2-$z1,2))/9.4605284e15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment