import { bound as d } from "./bound.mjs";
function O(r, u, f) {
  return r * u * f / (u + f * r);
}
function I(r, u, f, e, b = 0.15) {
  return b === 0 ? d(r, u, f) : r < u ? -O(u - r, e, b) + u : r > f ? +O(r - f, e, b) + f : r;
}
export {
  O as rubberband,
  I as rubberbandIfOutOfBounds
};
