Advertisement
Guest User

Lua distance func

a guest
May 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.14 KB | None | 0 0
  1. function distance(from, to)
  2.   return math.floor(math.sqrt(
  3.     (to[1] - from[1])^2 + (to[2] - from[2])^2 + (to[3] - from[3])^2
  4.   ))
  5. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement