Find the intersection of two lines: Difference between revisions

(Added AutoHotkey)
Line 389:
c.y = NAN;
}
else if(isnan(slopeA==NAN) && slopeB!=NANisnan(slopeB)){
c.x = a1.x;
c.y = (a1.x-b1.x)*slopeB + b1.y;
}
else if(isnan(slopeB==NAN) && slopeA!=NANisnan(slopeA)){
c.x = b1.x;
c.y = (b1.x-a1.x)*slopeA + b1a1.y;
}
else{
Line 414:
c = intersectionPoint(extractPoint(argV[1]),extractPoint(argV[2]),extractPoint(argV[3]),extractPoint(argV[4]));
if(isnan(c.x==NAN))
printf("The lines do not intersect, they are either parallel or co-incident.");
else
Anonymous user