Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Code refactoring: simple trig, but it's been so long.

by revdiablo (Prior)
on Dec 30, 2004 at 04:27 UTC ( [id://418176]=note: print w/replies, xml ) Need Help??


in reply to Re: Code refactoring: simple trig, but it's been so long.
in thread Code refactoring: simple trig, but it's been so long.

Evidently you feel more comfortable using degrees rather than radians but the conversion to and from radians<->degrees serves no real purpose.

Yeah, that was just out of habit. I noticed that the conversion between radians and degrees was pointless before I posted, but never got around to changing it to only radians.

You will get a division by zero crash in the case where $x and $y = 0 as it will fall through your 'extreme cases'.

Ah, I hadn't noticed that. Using Zaxo's code will eliminate that problem, though. Many thanks.

  • Comment on Re^2: Code refactoring: simple trig, but it's been so long.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://418176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-19 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found