Sorry, my mistake

A forum for general discussion of the Python programming language.

Sorry, my mistake

Postby stubzpub » Mon Feb 03, 2014 8:18 am

Playing with to many things late and got thing backwards ...

Mekire: Do not delete your posts. Even if you realize you were being foolish this is no excuse. Future threads will be locked from editing if you persist.
Last edited by stubzpub on Mon Feb 03, 2014 3:56 pm, edited 2 times in total.
stubzpub
 
Posts: 8
Joined: Mon Jan 06, 2014 5:32 am

Re: atan2(y,x)

Postby Mekire » Mon Feb 03, 2014 9:27 am

Not understanding you.

The arctangent of 0 is 0.

Code: Select all
math.atan2(y, x)
is the same as
Code: Select all
math.atan(y/x)

The advantage of math.atan2 is that it retains the signs correctly (and avoids zero division errors).

If the first argument is 0 then it will be 0.

-Mek
User avatar
Mekire
 
Posts: 984
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests