define(["exports","./Cartesian2-b4b7b0b3","./Check-5e798bbf","./when-208fe5b0","./Transforms-d5dbea8d"],function(t,h,e,o,a){"use strict";function c(t,e,n,i){this.x=o.defaultValue(t,0),this.y=o.defaultValue(e,0),this.width=o.defaultValue(n,0),this.height=o.defaultValue(i,0)}c.packedLength=4,c.pack=function(t,e,n){return n=o.defaultValue(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.width,e[n]=t.height,e},c.unpack=function(t,e,n){return e=o.defaultValue(e,0),(n=!o.defined(n)?new c:n).x=t[e++],n.y=t[e++],n.width=t[e++],n.height=t[e],n},c.fromPoints=function(t,e){if(o.defined(e)||(e=new c),!o.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var n=t.length,i=t[0].x,h=t[0].y,r=t[0].x,a=t[0].y,d=1;dn.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),t>n.height?n.height=t:t<0&&(n.height-=t,n.y=e.y),n},c.intersect=function(t,e){var n=t.x,i=t.y,h=e.x,r=e.y;return n>h+e.width||n+t.widthr+e.height?a.Intersect.OUTSIDE:a.Intersect.INTERSECTING},c.equals=function(t,e){return t===e||o.defined(t)&&o.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},c.prototype.clone=function(t){return c.clone(this,t)},c.prototype.intersect=function(t){return c.intersect(this,t)},c.prototype.equals=function(t){return c.equals(this,t)},t.BoundingRectangle=c});