Find the intersection of two lines: Difference between revisions
→{{header|TI-83 BASIC}}: Better special characters
PatGarrett (talk | contribs) (→{{header|360 Assembly}}: Section added) |
PatGarrett (talk | contribs) (→{{header|TI-83 BASIC}}: Better special characters) |
||
Line 1,731:
{{trans|Rexx}}
Simple version:
<lang ti83b>[[4,0][6,10][0,3][10,7]]
([A](2,2)-[A](1,2))/([A](2,1)-[A](1,1))
[A](1,2)-[A](1,1)*
([A](4,2)-[A](3,2))/([A](4,1)-[A](3,1))
[A](3,2)-[A](3,1)*
(C-A)/(B-D)
A+X*
C+X*
Disp {X,Y}</lang>
{{out}}
Line 1,745:
</pre>
Full version:
<lang ti83b>[[4,0][6,10][0,3][10,7]]
{4,2}
0→M
If [A](1,1)=[A](2,1)
Then
[A](1,1)
If [A](1,2)=[A](2,2):
Else
([A](2,2)-[A](1,2))/([A](2,1)-[A](1,1))
[A](1,2)-[B](1,1)*[A](1,1)
End
If [A](3,1)=[A](4,1)
Then
[A](3,1)
If [A](3,2)=[A](4,2):
Else
([A](4,2)-[A](3,2))/([A](4,1)-[A](3,1))
[A](3,2)-[B](1,2)*[A](3,1)
End
If M=0 Then
Line 1,772:
Then
If [B](3,1)=[B](3,2)
Then:
Else:
End
Else
[B](3,1)
[B](1,2)*X+[B](2,2)
End
Else
If [B](4,2)=0
Then
[B](3,2)
[B](1,1)*X+[B](2,1)
Else
If [B](1,1)=[B](1,2)
Then
If [B](2,1)=[B](2,2)
Then:
Else:
End
Else
([B](2,2)-[B](2,1))/([B](1,1)-[B](1,2))
[B](1,1)*X+[B](2,1)
End
End
|