Closed wesleytodd closed 6 years ago
http://jsperf.com/clamp-functions/19
Not entirely sure it matters, but I found this js perf and added your method to it. I can do the PR for this if you are interested.
function clamp(value, min, max) { return value < min ? min : value > max ? max : value; }
what if min > max?
min
max
To be honest I don't even remember opening this issue, or why I did. Closing.
http://jsperf.com/clamp-functions/19
Not entirely sure it matters, but I found this js perf and added your method to it. I can do the PR for this if you are interested.