Advertisement
Bolodefchoco_LUAXML

[Math] math.angle

Apr 30th, 2016
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. --Creator: Bolodefchoco
  2. --Made in: 30/04/2016
  3. --Last update: 17/12/2016
  4. --[[ Notes:
  5.     Does:
  6.         Retorna o ângulo entre dois pontos.
  7.     Args:
  8.         x1 --> Ponto 1 horizontal
  9.         y1 --> Ponto 1 vertical
  10.         x2 --> Ponto 2 horizontal
  11.         y2 --> Ponto 2 vertical
  12. ]]--
  13.  
  14. math.angle = function(x1,y1,x2,y2)
  15.     return math.atan2(y2-y1,x2-x1)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement