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