Hough transform: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: Add a link to an output image)
m (→‎{{header|Perl 6}}: added .race for concurrency)
Line 704: Line 704:
my $y = floor $pixel / $xsize;
my $y = floor $pixel / $xsize;


for 0..^$width -> $k {
(0..^$width).race.map: -> $k {
my $th = $dth*$k;
my $th = $dth*$k;
my $r = ($x*cos($th) + $y*sin($th));
my $r = ($x*cos($th) + $y*sin($th));