W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

Re: [csswg-drafts] [css-values] Trigonometric functions (#2331)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 28 Feb 2019 01:34:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-468100460-1551317658-sysbot+gh@w3.org>
Consistency is a reasonable argument I think ^_^. But also it means we get to avoid all the confusing evaluation rules; what's `2 ** 3 ** 4` equal to, what's `-1 ^ 2` equal to, etc etc. JS had a lot of confusion solving these, and ended up with some interesting restrictions as a result (for example, you have to parenthesize the LHS if it's a negative value, to avoid any ambiguity).

`pow(X, 2)`, on the other hand, is 100% unambiguous all the time.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2331#issuecomment-468100460 using your GitHub account
Received on Thursday, 28 February 2019 01:34:21 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:44 UTC