- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Fri, 12 Jul 2019 23:18:44 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-values] Clarify -0 in math functions == Mathematically, `asin ∘ sin` is the identity. I think CSS should try to preserve this for `-0`, so that `asin(sin(-0)) = -0`. Therefore, `sin(-0) = -0` and `asin(-0) = -0`. The spec should define these cases just like ES does in https://tc39.es/ecma262/#sec-math.sin And there are other cases which are not clear, for consistency I would just copy ES: - `sin(-0) = -0` and `asin(-0) = -0` - `tan(-0) = -0`, `atan(-0) = -0` - `atan2(-0, x >= +0) = -0`, `atan2(-0, x <= -0) = -π`, `atan2(-∞ < y < -0, +∞) = -0` - `pow(-0, odd integer) = -0`, `pow(-∞, odd integer < -0) = -0` - `sqrt(-0) = -0`. Though it doesn't make much sense since `-0 * -0 = +0` The comparison functions are already covered in https://drafts.csswg.org/css-values/#calc-type-checking > When comparing 0+ and 0-, 0- is less than 0+. For example, `min(0, -0)` must produce 0-, `max(0, -0)` must produce 0+, and `clamp(0, -0, 1)` must produce 0+. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4110 using your GitHub account
Received on Friday, 12 July 2019 23:18:46 UTC