Find the intersection of two lines: Difference between revisions
Content added Content deleted
No edit summary |
Basicgames (talk | contribs) |
||
Line 569: | Line 569: | ||
print "yab = ", y |
print "yab = ", y |
||
print "ycd = ", (yc - xc * ((yd - yc) / (xd - xc)) + x * ((yd - yc) / (xd - xc))) |
print "ycd = ", (yc - xc * ((yd - yc) / (xd - xc)) + x * ((yd - yc) / (xd - xc))) |
||
print "intersection: (", x, comma, " ", y, ")" |
print "intersection: (", x, comma, " ", y, ")"</syntaxhighlight> |
||
{{out| Output}}<pre>The two lines are: |
|||
yab = -20 + x * 5 |
|||
end</syntaxhighlight> |
|||
ycd = 3 + x * 0.4000 |
|||
x = 5 |
|||
yab = 5 |
|||
ycd = 5 |
|||
intersection: (5, 5)</pre> |
|||
==={{header|Run BASIC}}=== |
==={{header|Run BASIC}}=== |