|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: Code refactoring: simple trig, but it's been so long.by tachyon (Chancellor) |
| on Dec 29, 2004 at 21:08 UTC ( [id://418156]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Evidently you feel more comfortable using degrees rather than radians but the conversion to and from radians<->degrees serves no real purpose. Just define:
You will get a division by zero crash in the case where $x and $y = 0 as it will fall through your 'extreme cases'. You can remove the dependency on a module by using radians and using a function for atan() like:
cheers tachyon
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||