Question: How do I write a function that checks whether two line segments intersect?

so would anybody know how to write a function that checks whether two line segments intersect?  each line segment is given a list [[a,b],[x,y]] , of 2 lists with 2 numbers in each.   

it should return  "True" if ∃s,t  [0,t] : sa+(1-s)b =tx+(1-t)y ,  else"False"

 I haven't a clue so any help would be appreciated,

thanks in advance.

Please Wait...