Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def betweenTwoAngles(A,B,x):
- #The semicircle moves from A to B
- #The range for A, B and x are -math.pi to math.pi
- tau = math.pi*2
- if A < 0:
- A += tau
- if B < 0:
- B += tau
- if x < 0:
- x += tau
- B -= A
- x -= A
- A = 0
- if x <= B and x > 0:
- return True
- return False
Advertisement
Add Comment
Please, Sign In to add comment