You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2331 (comment) Iʼve aleady asked to incorporate the functionality offered by atan2() into atan().
I understand that many authors will be familiar with “atan2” or “arctan2” from programming languages, JS in particular. According to Wikipedia, some languages support an optional parameter for their arctangent function: Common Lisp, Mathematica. Other implementations, spreadsheet formulas in particular, expect the arguments in the reverse order.
Can we add an optional second argument to atan() while keeping atan2() with two mandatory arguments?
The text was updated successfully, but these errors were encountered:
Crissov
changed the title
[] Redundancy of atan2()
[css-values] Redundancy of atan2()
Nov 5, 2019
If we copied rgb and rgba, we would have both allowing one or two arguments, with serialization rules that atan and atan2 serialize as atan if they have one argument and atan2 if they have two arguments.
I'd prefer that we be consistent with JavaScript. Intent is clearer when authors always use atan with one argument and atan2 with two arguments.
I made the intentional choice to include both atan() and atan2() to coincide with JS; I've since made sure that the functions agree with JS in as many additional ways as possible, most particularly their corner-case behavior for NaN/Infinity/zero in various spots.
Sticking close to JS for these functions is, I think, better. And as long as we're keeping atan2() around anyway (as your issue suggests we do), I don't think diverging from JS to allow atan() to copy the functionality makes a lot of sense; it doesn't add any new functionality, and there's no guarantee it would accord in all the corner cases with the 1-or-2-args versions of atan in other programming languages.
In #2331 (comment) Iʼve aleady asked to incorporate the functionality offered by
atan2()
intoatan()
.I understand that many authors will be familiar with “atan2” or “arctan2” from programming languages, JS in particular. According to Wikipedia, some languages support an optional parameter for their arctangent function: Common Lisp, Mathematica. Other implementations, spreadsheet formulas in particular, expect the arguments in the reverse order.
Can we add an optional second argument to
atan()
while keepingatan2()
with two mandatory arguments?The text was updated successfully, but these errors were encountered: