- From: Noam Rosenthal via GitHub <sysbot+gh@w3.org>
- Date: Mon, 31 Mar 2025 07:20:06 +0000
- To: public-css-archive@w3.org
> The spec needs to say how to map the 0-1 range to a k value, so you need to describe the inverse of `0.5^(1 / (2^n))`, which is an ugly thing with lots of nested `ln()`; in JS; > > ``` > const log2 = Math.log(2); > return (Math.log(- 1 / Math.log(fraction)) + Math.log(log2)) / log2; > ``` > > And this is actually mapping `p` -> `s`, not `p` -> `k`. Sure, the spec currently specifies this for the regular k, it's not too difficult to add the log(2) bit. > > I think the animation logic also needs to preserve symmetry by saying that if the fraction `p` < 0.5, you compute for `1-p` and negate the result (or somehow otherwise agree with the spec text about how to render the curve). Agreed about symmetry. -- GitHub Notification of comment by noamr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11609#issuecomment-2765340116 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 31 March 2025 07:20:07 UTC