import { clamp as N } from "@mui/utils";
function f(r, t = Number.MIN_SAFE_INTEGER, e = Number.MAX_SAFE_INTEGER, u = NaN, b = !1) {
  if (Number.isNaN(u))
    return N(r, t, e);
  if (b)
    return N(r, t, e);
  const s = u || 1, i = r % s, n = Math.sign(i);
  return Math.abs(i) > s / 2 ? N(r + n * (s - Math.abs(i)), t, e) : N(r - n * Math.abs(i), t, e);
}
function c(r) {
  return typeof r == "number" && !Number.isNaN(r) && Number.isFinite(r);
}
export {
  f as clampStepwise,
  c as isNumber
};
