Re: [csswg-drafts] [css-values] random() function (#2826)

@DavidBradbury Your set distributions are not uniform. The [0,1) random number should be multiplied by the length of the list (not minus 1), then floor (not round).

Also, I don't think "allowing for the final parameter to be a rounding function" is useful. What could be useful would be allowing an [easing function](https://www.w3.org/TR/css-easing-1/#easing-function) to define the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function), i.e. `linear` would be a uniform distribution. But some cubic beziers aren't non-decreasing, these would be invalid.

"the random value is calculated on a per-element basis at the moment the style is applied". Not sure this is well defined.

@Crissov Min, max and mean are deterministic statistics of a sample, this issue is about randomness, I don't see the relation. Anyway, you can calculate your custom mean with math functions.

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

Received on Friday, 24 January 2020 12:44:03 UTC