Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Creating a circle in a data structure

by AK108 (Friar)
on May 28, 2007 at 05:15 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://617793]
Front-paged by naikonta
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-26 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found