define(["exports","./Check-7b2a090c","./when-b60132fc","./Math-119be1a3"],(function(n,e,t,r){"use strict";function a(n,e,r,a){this.x=t.defaultValue(n,0),this.y=t.defaultValue(e,0),this.z=t.defaultValue(r,0),this.w=t.defaultValue(a,0)}a.fromElements=function(n,e,r,u,i){return t.defined(i)?(i.x=n,i.y=e,i.z=r,i.w=u,i):new a(n,e,r,u)},a.fromColor=function(n,e){return t.defined(e)?(e.x=n.red,e.y=n.green,e.z=n.blue,e.w=n.alpha,e):new a(n.red,n.green,n.blue,n.alpha)},a.clone=function(n,e){if(t.defined(n))return t.defined(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e.w=n.w,e):new a(n.x,n.y,n.z,n.w)},a.packedLength=4,a.pack=function(n,e,r){return r=t.defaultValue(r,0),e[r++]=n.x,e[r++]=n.y,e[r++]=n.z,e[r]=n.w,e},a.unpack=function(n,e,r){return e=t.defaultValue(e,0),t.defined(r)||(r=new a),r.x=n[e++],r.y=n[e++],r.z=n[e++],r.w=n[e],r},a.packArray=function(n,r){var u=n.length,i=4*u;if(t.defined(r)){if(!Array.isArray(r)&&r.length!==i)throw new e.DeveloperError("If result is a typed array, it must have exactly array.length * 4 elements");r.length!==i&&(r.length=i)}else r=new Array(i);for(var o=0;o=38)return r<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var a=r*n.x*.00390625;return a+=r*n.y*152587890625e-16,(a+=r*n.z*5.960464477539063e-8)*Math.pow(10,t)},n.Cartesian4=a}));