1 | initial version |
Hi,
In the first example, I guess, you are using not the correct formula to check the collinearity of two lines. There exists several ways do to this. If you won't use norm function have a look at:
http://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/
hope it helps!