Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = (5,6)
- b = (3,2)
- if (a[0] > 0 & b[0] > 0) | (a[0] < 0 & b[0] < 0):
- #both in same half
- if a[0] > 0:
- if a[1] > b[1]:
- return 'clockwise'
- else:
- return 'anticlockwise'
- else:
- if a[1] < b[1]:
- return 'clockwise'
- else:
- return 'anticlockwise'
- elif a[0] == b[0]:
- #both at same height, need to check y coordinates
- else:
- #in opposite halves
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement