Xiaolin Wu's line algorithm: Difference between revisions

m
→‎{{header|Perl 6}}: parentheses needed around x/y in main loop
(+ C# implemented code)
m (→‎{{header|Perl 6}}: parentheses needed around x/y in main loop)
Line 1,278:
 
=={{header|Perl 6}}==
{{works with|niecza|2013-03-02}}
<lang perl6>sub plot(\x, \y, \c) { say "plot {x} {y} {c}" }
Line 1,328 ⟶ 1,327:
Z
(intery, intery + gradient ... *)
-> (\x,\y) {
my \c = fpart(y);
$plot(x, floor(y) , 1 - c) unless c == 1;
2,392

edits