Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: circular area in a coordinates grid (AoA)by LanX (Saint) |
on Mar 20, 2019 at 00:20 UTC ( [id://1231466]=note: print w/replies, xml ) | Need Help?? |
you can also get rid of both squares x² = r²-y² now increment y2=y+1 x2² = r²-(y+1)² x2² = r²-y² - 2y - 1 x2² = x² - 2y -1 I'm too tired to get rid of the sqrt too now :)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|