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 n(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function a(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function r(t,n,a,r,s){return t[0]=n,t[1]=a,t[2]=r,t[3]=s,t}function s(t,n){if(t===n){const a=n[1];t[1]=n[2],t[2]=a}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t}function u(t,n){const a=n[0],r=n[1],s=n[2],u=n[3];let o=a*u-s*r;return o?(o=1/o,t[0]=u*o,t[1]=-r*o,t[2]=-s*o,t[3]=a*o,t):null}function o(t,n){const a=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=a,t}function e(t){return t[0]*t[3]-t[2]*t[1]}function c(t,n,a){const r=n[0],s=n[1],u=n[2],o=n[3],e=a[0],c=a[1],i=a[2],f=a[3];return t[0]=r*e+u*c,t[1]=s*e+o*c,t[2]=r*i+u*f,t[3]=s*i+o*f,t}function i(t,n,a){const r=n[0],s=n[1],u=n[2],o=n[3],e=Math.sin(a),c=Math.cos(a);return t[0]=r*c+u*e,t[1]=s*c+o*e,t[2]=r*-e+u*c,t[3]=s*-e+o*c,t}function f(t,n,a){const r=n[0],s=n[1],u=n[2],o=n[3],e=a[0],c=a[1];return t[0]=r*e,t[1]=s*e,t[2]=u*c,t[3]=o*c,t}function l(t,n){const a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=-a,t[3]=r,t}function h(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t}function M(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function b(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2)}function m(t,n,a,r){return t[2]=r[2]/r[0],a[0]=r[0],a[1]=r[1],a[3]=r[3]-t[2]*a[1],[t,n,a]}function d(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t}function p(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}function y(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function x(n,a){const r=n[0],s=n[1],u=n[2],o=n[3],e=a[0],c=a[1],i=a[2],f=a[3],l=t();return Math.abs(r-e)<=l*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(s-c)<=l*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(u-i)<=l*Math.max(1,Math.abs(u),Math.abs(i))&&Math.abs(o-f)<=l*Math.max(1,Math.abs(o),Math.abs(f))}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t}function j(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t}const S=c,q=p,_=Object.freeze(Object.defineProperty({__proto__:null,copy:n,identity:a,set:r,transpose:s,invert:u,adjoint:o,determinant:e,multiply:c,rotate:i,scale:f,fromRotation:l,fromScaling:h,str:M,frob:b,LDU:m,add:d,subtract:p,exactEquals:y,equals:x,multiplyScalar:g,multiplyScalarAndAdd:j,mul:S,sub:q},Symbol.toStringTag,{value:"Module"}));export{m as L,u as a,o as b,n as c,e as d,c as e,f,l as g,h,a as i,M as j,b as k,d as l,_ as m,p as n,y as o,x as p,g as q,i as r,r as s,s as t,j as u,S as v,q as w};
|