sudovanilla-website/public/@shoelace-style/shoelace/cdn/chunks/chunk.HF7GESMZ.js

16 lines
285 B
JavaScript
Raw Normal View History

2024-05-13 22:34:06 -05:00
// src/internal/math.ts
function clamp(value, min, max) {
const noNegativeZero = (n) => Object.is(n, -0) ? 0 : n;
if (value < min) {
return noNegativeZero(min);
}
if (value > max) {
return noNegativeZero(max);
}
return noNegativeZero(value);
}
export {
clamp
};