SHARE
TWEET

corrections

furas Jun 26th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def collinear(x1, y1, x2, y2, x3, y3): # <-- third point
  2.     m = 0
  3.  
  4.     a = x2 - x1
  5.     b = y2 - y1
  6.  
  7.     if a != 0:
  8.        m = b/a # <-- instead of a/b
  9.        print(m) # <-- instead of return m
  10.  
  11.     if (y3 - y2)*(x2 - x1) == (y2 - y1)*(x3 - x2):
  12.        print("True")
  13.     else:
  14.        print("False")
  15.  
  16.     #return m
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top