@adyen/adyen-platform-experience-web
Version:

14 lines (13 loc) • 510 B
JavaScript
import { isNumber as s, isSymbol as n } from "./is.js";
const c = (t, r, e) => (Math.min(t, e) !== t && ([t, e] = [e, t]), Math.max(t, Math.min(r, e))), o = (t) => !n(t) && t === ~~t, f = (t) => s(t) && 1 / t === 0, p = (t, r) => {
if (Number.isInteger(t) && Number.isInteger(r))
return t + Math.floor((r - t) / 2);
throw TypeError(`Expects 2 integer values: [${t}, ${r}]`);
}, b = (t, r) => (t % r + r) % r;
export {
c as clamp,
o as isBitSafeInteger,
f as isInfinity,
p as mid,
b as mod
};