/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as n}from"../../../geometry/projection/projectBuffer.js";function m(l,m,u){if(null==l||null==u)return!1;let i=!0;return e[0]=null!=l.xmin?l.xmin:0,e[1]=null!=l.ymin?l.ymin:0,e[2]=null!=l.zmin?l.zmin:0,i=i&&n(e,l.spatialReference,0,m,u,0),e[0]=null!=l.xmax?l.xmax:0,e[1]=null!=l.ymax?l.ymax:0,e[2]=null!=l.zmax?l.zmax:0,i=i&&n(e,l.spatialReference,0,m,u,3),null==l.xmin&&(m[0]=-1/0),null==l.ymin&&(m[1]=-1/0),null==l.zmin&&(m[2]=-1/0),null==l.xmax&&(m[3]=1/0),null==l.ymax&&(m[4]=1/0),null==l.zmax&&(m[5]=1/0),i}function u(l,m,u){if(null==l||null==u)return!1;let i=!0;return e[0]=null!=l.xmin?l.xmin:0,e[1]=null!=l.ymin?l.ymin:0,e[2]=null!=l.zmin?l.zmin:0,i=i&&n(e,l.spatialReference,0,e,u,0),m[0]=e[0],m[1]=e[1],e[0]=null!=l.xmax?l.xmax:0,e[1]=null!=l.ymax?l.ymax:0,e[2]=null!=l.zmax?l.zmax:0,i=i&&n(e,l.spatialReference,0,e,u,0),m[2]=e[0],m[3]=e[1],null==l.xmin&&(m[0]=-1/0),null==l.ymin&&(m[1]=-1/0),null==l.xmax&&(m[2]=1/0),null==l.ymax&&(m[3]=1/0),i}const e=l();export{m as projectToBoundingBox,u as toBoundingRect};
