Jump to content

Color wheel: Difference between revisions

→‎{{header|Perl 6}}: minor teaks, half the run time, same output
(Added Go)
(→‎{{header|Perl 6}}: minor teaks, half the run time, same output)
Line 214:
 
sub color-wheel ( $png ) {
for ^$w .race.map: -> $x {
for ^$h -> $y {
my $vector = $center - $x - $y*i;
Line 236:
when 5/6..1 { $c, 0, $x }
}
( $r, $g, $b ) = .map {: (($_*+$m) * 255).Int }, $r, $g, $b;
}</lang>
 
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.