Created
September 3, 2013 04:16
-
-
Save Bryukh/6419675 to your computer and use it in GitHub Desktop.
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 characters
#A is FromPoint B is ToPoint, [x, y] is a hit point | |
if min(x, xa) <= xb <= max(x, xa) and min(y, ya) <= yb <= max(y, ya): | |
return True | |
elif min(xa, xb) <= x <= max(xb, xa) and min(yb, ya) <= y <= max(yb, ya): | |
return True | |
else: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment