in reply to sloooowwwwww code!
this piece of untested code would save you 40 lines of code. Not bad eh? Before thinking of speed, try to see if you can make your code more compact.my @directions = ('w', 'sw', 's', 'se', 'e', 'ne', 'n', 'nw'); my $anchor = $directions[int($real_angle/45 + 0.5)];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: sloooowwwwww code!
by tachyon (Chancellor) on Sep 12, 2003 at 10:36 UTC |