Check if two polygons overlap: Difference between revisions

→‎{{header|ALGOL 68}}: Fixed horrendous bug, output showed poly2 instead of poly1! Doh!
(→‎{{header|ALGOL 68}}: Simplified a little)
(→‎{{header|ALGOL 68}}: Fixed horrendous bug, output showed poly2 instead of poly1! Doh!)
Line 124:
, poly3 = ( ( 1, 0 ), ( 1, 2 ), ( 5, 4 ), ( 9, 2 ), ( 9, 0 ) )
;
print( ( "poly1 = ", TOSTRING poly2poly1, newline ) );
print( ( "poly2 = ", TOSTRING poly2, newline ) );
print( ( "poly3 = ", TOSTRING poly3, newline ) );
Line 135:
{{out}}
<pre>
poly1 = ( ( 40, 0 ), ( 40, 2 ), ( 51, 4 ), ( 62, 2 ), ( 62, 0 ) )
poly2 = ( ( 4, 0 ), ( 4, 2 ), ( 5, 4 ), ( 6, 2 ), ( 6, 0 ) )
poly3 = ( ( 1, 0 ), ( 1, 2 ), ( 5, 4 ), ( 9, 2 ), ( 9, 0 ) )
3,038

edits