-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Description
For background, see discussions starting at #544 (comment)
It would be useful to add a clamp() function. Two kinds of argument order were proposed in #544:
(min, value, max)(value, min, max)
Both of them have precedents[1][2]. (I personally prefer the (min, value, max) version.)
Although authors can emulate it by combining max() and min(), the clamp() function can avoid the confusion caused by the emulation.
The behavior of clamp() on <angle> and <color> also needs some thoughts.
Links:
js-choi, jhpratt, mblackritter and yisiblmblackritter