/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{b as r}from"../../chunks/vec32.js";import{getProjectorClassification as t,invPlateCarreeScale as e}from"./projectors.js";import{earth as s}from"../support/Ellipsoid.js";import{equals as o}from"../support/spatialReferenceUtils.js";function i(i,n,f,u){const c=t(n,u);if(null==c)return!1;const p=c.source.spatialReferenceId,a=c.dest.spatialReferenceId;if(p===a&&0!==p||o(n,u))return f[0]=1,f[1]=1,f[2]=1,!0;if(1===p){const t=r(i),o=t/Math.sqrt(i[0]*i[0]+i[1]*i[1]),n=t/s.radius;if(3===a)return f[0]=o*n,f[1]=o*n,f[2]=1,!0;if(2===a||5===a){const r=e;return f[0]=r*o*n,f[1]=r*n,f[2]=1,!0}}else if(11===p){if(2===a||5===a)return f[0]=e,f[1]=e,f[2]=1,!0;if(3===a){const r=i[1]/s.radius;return f[0]=1,f[1]=1/Math.cos(r),f[2]=1,!0}}return!1}export{i as localLinearScaleFactors};
