/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","./common"],(function(t,n){"use strict";function r(t,n){return t[0]=n[0],t[1]=n[1],t}function e(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function a(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function u(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function c(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function s(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t}function i(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t}function f(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function d(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function h(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function m(t,n){const r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function q(t,n){const r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function b(t){const n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function p(t){const n=t[0],r=t[1];return n*n+r*r}function g(t,n){return t[0]=-n[0],t[1]=-n[1],t}function v(t,n){return t[0]=1/n[0],t[1]=1/n[1],t}function x(t,n){const r=n[0],e=n[1];let o=r*r+e*e;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t}function A(t,n){return t[0]*n[0]+t[1]*n[1]}function y(t,n,r){const e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t}function L(t,n,r,e){const o=n[0],a=n[1];return t[0]=o+e*(r[0]-o),t[1]=a+e*(r[1]-a),t}function S(t,r){r=r||1;const e=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(e)*r,t[1]=Math.sin(e)*r,t}function D(t,n,r){const e=n[0],o=n[1];return t[0]=r[0]*e+r[2]*o,t[1]=r[1]*e+r[3]*o,t}function O(t,n,r){const e=n[0],o=n[1];return t[0]=r[0]*e+r[2]*o+r[4],t[1]=r[1]*e+r[3]*o+r[5],t}function P(t,n,r){const e=n[0],o=n[1];return t[0]=r[0]*e+r[3]*o+r[6],t[1]=r[1]*e+r[4]*o+r[7],t}function j(t,n,r){const e=n[0],o=n[1];return t[0]=r[0]*e+r[4]*o+r[12],t[1]=r[1]*e+r[5]*o+r[13],t}function E(t,n,r,e){const o=n[0]-r[0],a=n[1]-r[1],u=Math.sin(e),c=Math.cos(e);return t[0]=o*c-a*u+r[0],t[1]=o*u+a*c+r[1],t}function I(t,n){const r=t[0],e=t[1],o=n[0],a=n[1];let u=r*r+e*e;u>0&&(u=1/Math.sqrt(u));let c=o*o+a*a;c>0&&(c=1/Math.sqrt(c));const s=(r*o+e*a)*u*c;return s>1?0:s<-1?Math.PI:Math.acos(s)}function _(t){return"vec2("+t[0]+", "+t[1]+")"}function z(t,n){return t[0]===n[0]&&t[1]===n[1]}function N(t,r){const e=t[0],o=t[1],a=r[0],u=r[1];return Math.abs(e-a)<=n.EPSILON*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(o-u)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))}function R(t,n,r,e,o){let a=n[0]-r[0],u=n[1]-r[1];const c=(e[0]*a+e[1]*u)*(o-1);return a=e[0]*c,u=e[1]*c,t[0]=n[0]+a,t[1]=n[1]+u,t}const T=b,k=a,w=u,B=c,C=m,F=q,G=p,H=Object.freeze(Object.defineProperty({__proto__:null,copy:r,set:e,add:o,subtract:a,multiply:u,divide:c,ceil:s,floor:i,min:f,max:l,round:M,scale:d,scaleAndAdd:h,distance:m,squaredDistance:q,length:b,squaredLength:p,negate:g,inverse:v,normalize:x,dot:A,cross:y,lerp:L,random:S,transformMat2:D,transformMat2d:O,transformMat3:P,transformMat4:j,rotate:E,angle:I,str:_,exactEquals:z,equals:N,projectAndScale:R,len:T,sub:k,mul:w,div:B,dist:C,sqrDist:F,sqrLen:G},Symbol.toStringTag,{value:"Module"}));t.add=o,t.angle=I,t.ceil=s,t.copy=r,t.cross=y,t.dist=C,t.distance=m,t.div=B,t.divide=c,t.dot=A,t.equals=N,t.exactEquals=z,t.floor=i,t.inverse=v,t.len=T,t.length=b,t.lerp=L,t.max=l,t.min=f,t.mul=w,t.multiply=u,t.negate=g,t.normalize=x,t.projectAndScale=R,t.random=S,t.rotate=E,t.round=M,t.scale=d,t.scaleAndAdd=h,t.set=e,t.sqrDist=F,t.sqrLen=G,t.squaredDistance=q,t.squaredLength=p,t.str=_,t.sub=k,t.subtract=a,t.transformMat2=D,t.transformMat2d=O,t.transformMat3=P,t.transformMat4=j,t.vec2=H}));
