mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-28 04:20:56 +00:00
19 lines
392 B
JavaScript
19 lines
392 B
JavaScript
'use client';
|
|
'use strict';
|
|
|
|
function clamp(value, min, max) {
|
|
if (min === void 0 && max === void 0) {
|
|
return value;
|
|
}
|
|
if (min !== void 0 && max === void 0) {
|
|
return Math.max(value, min);
|
|
}
|
|
if (min === void 0 && max !== void 0) {
|
|
return Math.min(value, max);
|
|
}
|
|
return Math.min(Math.max(value, min), max);
|
|
}
|
|
|
|
exports.clamp = clamp;
|
|
//# sourceMappingURL=clamp.cjs.map
|