Re: [csswg-drafts] [css-values-4] How to interpolate <ratio>? (#4953)

@tabatkins I think the formula needs to special-case `positive/0`, `0/positive` and `0/0` at interpolation boundaries. For example, the interpolation between `0/1` and `1/1` at distance `1` should be `1/1` according to https://drafts.csswg.org/css-values/#interpolation, but the formula produces `10^(log(0)*0 + log(1)*1) = 10^(-∞*0 + 0*1) = NaN = 0/0`.

Also, it may be useful to note that the formula can be simplified to `ratio1^(1-p) * ratio2^p`, and in the halfway example this is the [geometric mean](https://en.wikipedia.org/wiki/Geometric_mean).

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 5 November 2020 18:34:26 UTC