Anonymous user
Find the intersection of two lines: Difference between revisions
Find the intersection of two lines (view source)
Revision as of 19:59, 6 September 2020
, 3 years ago→{{header|C}}
Alpha bravo (talk | contribs) (Added AutoHotkey) |
|||
Line 389:
c.y = NAN;
}
else if(isnan(slopeA
c.x = a1.x;
c.y = (a1.x-b1.x)*slopeB + b1.y;
}
else if(isnan(slopeB
c.x = b1.x;
c.y = (b1.x-a1.x)*slopeA +
}
else{
Line 414:
c = intersectionPoint(extractPoint(argV[1]),extractPoint(argV[2]),extractPoint(argV[3]),extractPoint(argV[4]));
if(isnan(c.x
printf("The lines do not intersect, they are either parallel or co-incident.");
else
|