Re: [csswg-drafts] [css-values] Radians considered useless without π

Whether trig functions take numbers or angles is a matter of convention. While they arise from circles and angles, their standard definitions (as Taylor series) definitely treat their argument as a plain number, and trig is used in many contexts where angles aren't what's being talked about.  (For example, one way to calculate `e^(i*N)`, a plain number, is `cos(N) + i*sin(N)`.)  I'd probably define them in CSS to take either, actually.  (Outside of CSS, yes, "angles" are actually unitless numbers, dimensional-analysis-wise.)

Anyway, the reason pi is more important there is that so many trig formulas are expressed in terms of it. Requiring the author to convert to tau (using `turn`) makes it more error-prone and harder to read.  Pi is also written explicitly in these formulas, so switching over to a unit-ed value means your formula drifts even further from the original - instead of  writing, say, `sin(5 * pi / 2)`, you have to convert to `sin(5turn / 4)` or something like that.  I think that kicks it over the point where "just use turn" makes sense.  (The latter objection also means that `pirad` as a unit isn't great, tho it's less bad than `turn` in this instance.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/309#issuecomment-331297515 using your GitHub account

Received on Thursday, 21 September 2017 22:18:46 UTC