Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import math
  2. def GetGeographicalRadians(shape):
  3.  
  4. radian = math.atan2(shape.lastpoint.y - shape.firstpoint.y,
  5. shape.lastpoint.x - shape.firstpoint.x)
  6. if (radian<0):
  7. radian = (radian+math.pi)*(-1)+math.pi
  8. else:
  9. radian=(radian-math.pi)*(-1)+math.pi
  10. return radian
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement