bool norm_Inter( Line l1 , Line l2 )
{
double c1 = (l1.e-l1.s)^(l2.s-l1.s);
double c2 = (l1.e-l1.s)^(l2.e-l1.s);
double c3 = (l2.e-l2.s)^(l1.s-l2.s);
double c4 = (l2.e-l2.s)^(l1.e-l2.s);
return sgn(c1)*sgn(c2)<0&&sgn(c3)*sgn(c4)<0;
}
bool unnorm_Inter( Line l1 , Line l2 )
{
return
max( l1.s.x , l1.e.x )>=min( l2.s.x , l2.e.x )&&
max( l2.s.x , l2.e.x )>=min( l1.s.x , l1.e.x )&&
max( l1.s.y , l1.e.y )>=min( l2.s.y , l2.e.y )&&
max( l2.s.y , l2.e.y )>=min( l1.s.y , l1.e.y )&&
sgn((l2.s-l1.e)^(l1.s-l1.e))*sgn((l2.e-l1.e)^(l1.e-l1.e))<=0&&
sgn((l1.s-l2.e)^(l2.s-l2.e))*sgn((l1.e-l2.e)^(l2.s-l2.e))<=0;
}