A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/081168.html below:

Tangents and the like...

Tangents and the like... Tangents and the like...zzzzz zzizz_ at notmail.com
Thu Apr 12 22:29:42 EDT 2001
On Thu, 12 Apr 2001 18:01:43 -0600, Mitch Chapman
<chapman at bioreason.com> wrote:

>Mark Rowe wrote:
>> Just been reading through the Math modules documentation and i can't see any
>> way to find the inverse tangent of a number....  I know that this is
>> possible, but how?
>
>>>> import math
>>>> math.pi/4.0
>0.785398163397
>>>> math.atan(1.0)
>0.785398163397
>>>> math.atan2(1.0, 1.0)
>0.785398163397

Also use atan2(y,x) to get the angle from -pi < theta < pi whereas if
you use atan you'll only get -pi/2 < result < pi/2 which will _not_ be
the same as the real angle.
eg)
>>> math.atan2(-10,-10)*180/math.pi
-135.0


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4