/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{floatEqualAbsolute as n}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as r}from"../../core/units.js";const e=96;function i(n,i){const u=i||n.extent,o=n.width,c=t(u?.spatialReference);return u&&o?u.width/o*c*r*e:0}function u(n,i){return n/(t(i)*r*e)}function o(n){return n/(r*e)}function c(n,i){return n*(t(i)*r*e)}function f(n,t){const r=n.extent,e=n.width-(n.padding?n.padding.left+n.padding.right:0),i=u(t,r.spatialReference);return r.clone().expand(i*e/r.width)}function d(n,t,r){return I(n,t)&&a(n,r)}function I(t,r){return 0===r||n(t,r)||t<r}function a(t,r){return 0===r||n(t,r)||t>r}function p(t,r){if(n(t,r))return 0;return(t||Number.POSITIVE_INFINITY)>(r||Number.POSITIVE_INFINITY)?1:-1}export{p as compareMinScale,f as getExtentForScale,u as getResolutionForScale,o as getResolutionInMetersForScale,i as getScale,c as getScaleForResolution,d as isInScaleRange};
