Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. local DistanceBetweenUnits = function('player', 'focus')
  2. local ax, ay = UnitPosition('player')
  3. local bx, by = UnitPosition('focus')
  4. if ax and bx then
  5. local dx = ax - bx
  6. local dy = ay - by
  7. return (dx * dx + dy * dy) ^ 0.5
  8. end
  9. return nil
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement