"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _baseClamp = require("./_baseClamp.js");
const toNumber = require("./toNumber.js");
function clamp(number, lower, upper) {
  if (upper === void 0) {
    upper = lower;
    lower = void 0;
  }
  if (upper !== void 0) {
    upper = toNumber.default(upper);
    upper = upper === upper ? upper : 0;
  }
  if (lower !== void 0) {
    lower = toNumber.default(lower);
    lower = lower === lower ? lower : 0;
  }
  return _baseClamp.default(toNumber.default(number), lower, upper);
}
exports.default = clamp;
