Plasma effect: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: more efficient color space conversion) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: eliminate some intermediate variables) |
||
Line 1,115: | Line 1,115: | ||
my $x = $c * (1 - abs( (($h*6) % 2) - 1 ) ); |
my $x = $c * (1 - abs( (($h*6) % 2) - 1 ) ); |
||
my $m = $v - $c; |
my $m = $v - $c; |
||
(do given $h { |
|||
when 0..^1/6 { $c, $x, 0 } |
when 0..^1/6 { $c, $x, 0 } |
||
when 1/6..^1/3 { $x, $c, 0 } |
when 1/6..^1/3 { $x, $c, 0 } |