Ray-casting algorithm: Difference between revisions

Content added Content deleted
m (ANSI Standard BASIC moved to the BASIC section.)
(→‎{{header|ANSI Standard BASIC}}: Changed to {{header|ANSI BASIC}}; {{works with|Decimal BASIC}}; output.)
Line 591: Line 591:


=={{header|BASIC}}==
=={{header|BASIC}}==
==={{header|ANSI Standard BASIC}}===
==={{header|ANSI BASIC}}===
{{trans|FreeBASIC}}
{{trans|FreeBASIC}}
{{works with|Decimal BASIC}}
<syntaxhighlight lang="ansi standard basic">1000 PUBLIC NUMERIC x,y
<syntaxhighlight lang="basic">1000 PUBLIC NUMERIC x,y
1010 LET x=1
1010 LET x=1
1020 LET y=2
1020 LET y=2
Line 777: Line 778:
2820 END
2820 END
</syntaxhighlight>
</syntaxhighlight>
{{out}}
<pre>
squared
(5,5) in
(5,8) in
(-10,5) out
(0,5) out
(10,5) in
(8,5) in
(10,10) out

squared hole
(5,5) out
(5,8) in
(-10,5) out
(0,5) out
(10,5) in
(8,5) in
(10,10) out

strange
(5,5) in
(5,8) out
(-10,5) out
(0,5) out
(10,5) in
(8,5) in
(10,10) out

exagon
(5,5) in
(5,8) in
(-10,5) out
(0,5) out
(10,5) in
(8,5) in
(10,10) out
</pre>


=={{header|C}}==
=={{header|C}}==