12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{g as t}from"./common.js";function a(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t}function n(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function s(t,a,n,s,r,u,o){return t[0]=a,t[1]=n,t[2]=s,t[3]=r,t[4]=u,t[5]=o,t}function r(t,a){const n=a[0],s=a[1],r=a[2],u=a[3],o=a[4],e=a[5];let c=n*u-s*r;return c?(c=1/c,t[0]=u*c,t[1]=-s*c,t[2]=-r*c,t[3]=n*c,t[4]=(r*e-u*o)*c,t[5]=(s*o-n*e)*c,t):null}function u(t){return t[0]*t[3]-t[1]*t[2]}function o(t,a,n){const s=a[0],r=a[1],u=a[2],o=a[3],e=a[4],c=a[5],i=n[0],h=n[1],M=n[2],f=n[3],b=n[4],l=n[5];return t[0]=s*i+u*h,t[1]=r*i+o*h,t[2]=s*M+u*f,t[3]=r*M+o*f,t[4]=s*b+u*l+e,t[5]=r*b+o*l+c,t}function e(t,a,n){const s=a[0],r=a[1],u=a[2],o=a[3],e=a[4],c=a[5],i=Math.sin(n),h=Math.cos(n);return t[0]=s*h+u*i,t[1]=r*h+o*i,t[2]=s*-i+u*h,t[3]=r*-i+o*h,t[4]=e,t[5]=c,t}function c(t,a,n){const s=a[0],r=a[1],u=a[2],o=a[3],e=a[4],c=a[5],i=n[0],h=n[1];return t[0]=s*i,t[1]=r*i,t[2]=u*h,t[3]=o*h,t[4]=e,t[5]=c,t}function i(t,a,n){const s=a[0],r=a[1],u=a[2],o=a[3],e=a[4],c=a[5],i=n[0],h=n[1];return t[0]=s,t[1]=r,t[2]=u,t[3]=o,t[4]=s*i+u*h+e,t[5]=r*i+o*h+c,t}function h(t,a){const n=Math.sin(a),s=Math.cos(a);return t[0]=s,t[1]=n,t[2]=-n,t[3]=s,t[4]=0,t[5]=0,t}function M(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=a[1],t[4]=0,t[5]=0,t}function f(t,a){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=a[0],t[5]=a[1],t}function b(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"}function l(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+1)}function m(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t[4]=a[4]+n[4],t[5]=a[5]+n[5],t}function d(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t[4]=a[4]-n[4],t[5]=a[5]-n[5],t}function p(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t[4]=a[4]*n,t[5]=a[5]*n,t}function x(t,a,n,s){return t[0]=a[0]+n[0]*s,t[1]=a[1]+n[1]*s,t[2]=a[2]+n[2]*s,t[3]=a[3]+n[3]*s,t[4]=a[4]+n[4]*s,t[5]=a[5]+n[5]*s,t}function y(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]}function g(a,n){const s=a[0],r=a[1],u=a[2],o=a[3],e=a[4],c=a[5],i=n[0],h=n[1],M=n[2],f=n[3],b=n[4],l=n[5],m=t();return Math.abs(s-i)<=m*Math.max(1,Math.abs(s),Math.abs(i))&&Math.abs(r-h)<=m*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(u-M)<=m*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(o-f)<=m*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(e-b)<=m*Math.max(1,Math.abs(e),Math.abs(b))&&Math.abs(c-l)<=m*Math.max(1,Math.abs(c),Math.abs(l))}const S=o,j=d,q=Object.freeze(Object.defineProperty({__proto__:null,copy:a,identity:n,set:s,invert:r,determinant:u,multiply:o,rotate:e,scale:c,translate:i,fromRotation:h,fromScaling:M,fromTranslation:f,str:b,frob:l,add:m,subtract:d,multiplyScalar:p,multiplyScalarAndAdd:x,exactEquals:y,equals:g,mul:S,sub:j},Symbol.toStringTag,{value:"Module"}));export{f as a,h as b,r as c,s as d,q as e,M as f,a as g,u as h,n as i,b as j,l as k,m as l,o as m,d as n,p as o,x as p,y as q,e as r,c as s,i as t,g as u,S as v,j as w};
|