Expressions atan2

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Expressions atan2

Post by edwilliams16 »

https://wiki.freecadweb.org/Expressions ... _functions for atan2 is misleading
The expression atan2(y; x) returns the python math.degrees(math.atan2(y, x)) and returns 0 for the invalid (0,0) input. In the first quadrant this is atan(y/x) , not atan(x/y)

Swapping the names of the x,y arguments is confusing to say the least, since the whole point of the function is to return the angle accounting for the quadrant in the x/y plane. Any reason not to change this?

https://docs.python.org/3/library/math.html
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Expressions atan2

Post by Roy_043 »

edwilliams16 wrote: Fri Nov 04, 2022 9:03 pm Any reason not to change this?
I don't see one, so please change this, thanks.
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Expressions atan2

Post by edwilliams16 »

Done - and I tidied up a few imprecisions.
Post Reply