/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{copy as m,scale as a,dot as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ConstraintOptions as t}from"./ConstraintOptions.js";function i(m,a){return 0!==(m&a)}function r(m,a,n,t,i,r){0!==m&&(n?(r.min=Math.min(r.min,a),r.max=Math.max(r.max,a)):null!=t?(r.min-=Math.max(0,(a-r.min)*(1-t)),r.max+=Math.max(0,(a-r.max)*(1-t))):i&&(r.min-=Math.max(0,a-r.min-i),r.max+=Math.max(0,a-r.max-i)))}const o=new t(0);function x(t,i,r,o){return i=i||t.viewForward,m(o,i),a(o,o,Math.sign(n(i,r))),o}export{r as adjustRangeForInteraction,o as defaultConstraintOptions,i as hasConstraintType,x as interactionDirectionTowardsConstraintMinimization};
