import{clamp as i}from"../../../../../popmotion/dist/es/utils/clamp.js";import{progress as n}from"../../../../../popmotion/dist/es/utils/progress.js";import{mix as o}from"../../../../../popmotion/dist/es/utils/mix.js";import{distance as t}from"../../../../../popmotion/dist/es/utils/distance.js";function r(i,n,o){return void 0===n&&(n=0),void 0===o&&(o=.01),t(i,n)<o}function m(i){return i.max-i.min}function s(o,t){var r=.5,s=m(o),e=m(t);return e>s?r=n(t.min,t.max-s,o.min):s>e&&(r=n(o.min,o.max-e,t.min)),i(0,1,r)}function e(i,n,t,s){void 0===s&&(s=.5),i.origin=s,i.originPoint=o(n.min,n.max,i.origin),i.scale=m(t)/m(n),r(i.scale,1,1e-4)&&(i.scale=1),i.translate=o(t.min,t.max,i.origin)-i.originPoint,r(i.translate)&&(i.translate=0)}function a(i,n,o,t){e(i.x,n.x,o.x,p(t.originX)),e(i.y,n.y,o.y,p(t.originY))}function p(i){return"number"==typeof i?i:.5}export{s as calcOrigin,r as isNear,e as updateAxisDelta,a as updateBoxDelta};
//# sourceMappingURL=delta-calc.js.map
