Created
March 25, 2019 13:46
-
-
Save ManivannanMurugavel/96e02cfd8875f6b94ea48e4c2741df1e to your computer and use it in GitHub Desktop.
Revisions
-
ManivannanMurugavel created this gist
Mar 25, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import math def getAngle(a, b, c): ang = math.degrees(math.atan2(c[1]-b[1], c[0]-b[0]) - math.atan2(a[1]-b[1], a[0]-b[0])) return ang + 360 if ang < 0 else ang print(getAngle((5, 0), (0, 0), (0, 5)))