Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. -- calculate distance
  2. local get_distance = function(a, b)
  3.  
  4. local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z
  5.  
  6. return square(x * x + y * y + z * z)
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement