Advertisement
Pirulax

Untitled

Jan 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. function _getDistanceBetweenPoints2D(x1, y1, x2, y2)
  2. return math.sqrt((x1-x2)^2+(y1-y2)^2)
  3. end
  4.  
  5.  
  6. function _getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
  7. return math.sqrt(math.sqrt((z1-z2)^2+(y1-y2)^2)^2+(x1-x2)^2)
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement