4 lines
90 B
JavaScript
4 lines
90 B
JavaScript
|
exports.clamp = function clamp (min, x, max) {
|
||
|
return Math.max(min, Math.min(x, max))
|
||
|
}
|