Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def collinear(x1, y1, x2, y2, x3, y3): # <-- third point
- m = 0
- a = x2 - x1
- b = y2 - y1
- if a != 0:
- m = b/a # <-- instead of a/b
- print(m) # <-- instead of return m
- if (y3 - y2)*(x2 - x1) == (y2 - y1)*(x3 - x2):
- print("True")
- else:
- print("False")
- #return m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement