Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Creating a circle in a data structure

by AK108 (Friar)
on May 28, 2007 at 05:15 UTC ( #617793=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
            for my $i (0 .. $radius ** 2) { # See "1" below
                # Rounded values, see "2" below
                my $x_val = int($radius * cos($i) + $center_x + 0.5);
    ...
                    $curpass{$x_val}{$y_val}++;
                }
            }
    
  2. or download this
    #!/usr/bin/perl
    
    use strict;
    ...
        foreach (@_) {$max = $_ if $_ > $max}
        return $max;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://617793]
Front-paged by naikonta
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-05-27 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?