Babylonian spiral: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (Added Perl) |
Thundergnat (talk | contribs) m (→Independent implementation: slices rather than explicit enumerations) |
||
Line 510: | Line 510: | ||
my @candidates = |@this.map: -> $test { |
my @candidates = |@this.map: -> $test { |
||
next-interval(++$radius) if $radius == $test<x>; |
next-interval(++$radius) if $radius == $test<x>; |
||
|((1, 1), (1, -1), (-1, 1), (-1, -1) X«*» |
|((1, 1), (1, -1), (-1, 1), (-1, -1) X«*» $test<x y>, $test<y x>) |
||
} |
} |
||
take @tail = |@candidates.min: { ( Θ - atan2 |.[1,0] ) % τ }; |
take @tail = |@candidates.min: { ( Θ - atan2 |.[1,0] ) % τ }; |