good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Perl odditiesby talexb (Chancellor) |
on Mar 01, 2005 at 19:01 UTC ( [id://435575]=note: print w/replies, xml ) | Need Help?? |
Well, once you have a routine for sin, then cos is the same thing, but pi/2 sooner. And I'm fairly sure that's the way it's implemented in the libraries. Using atan2 to do an inverse sin or cos is a bit of a walk in the park, but essentially I guess you have to find the 'Y' value once you have the 'X', then submit both to atan2, and that will give you the angle you're looking for. That's a nice brain exercise right after lunch. Alex / talexb / Toronto "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
In Section
Meditations
|
|