Problem calling math.cos()
Robert Kern
robert.kern at gmail.com
Sat Apr 22 17:32:04 EDT 2006
Tim Peters wrote:
> [Robert Kern]
>
>>...
>> ph3 = math.atan( ac3.imag / ac3.real )
>>...
>
> Don't do that: atan2 is the correct way to compute the angle, because
> the signs of both inputs are needed to determine the correct quadrant.
> So do:
>
> ph3 = math.atan2(ac3.imag, ac3.real)
>
> instead.
Hey, I just copied his code to show that it gave a different error than the one
he said. I didn't bother to fix it. :-)
--
Robert Kern
robert.kern at gmail.com
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list