define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./OrientedBoundingBox-1e0d2855"],(function(n,e,t,i){"use strict";const r={},a=new e.Cartesian3,o=new e.Cartesian3,u=new e.Cartesian3,s=new e.Cartesian3,c=new i.OrientedBoundingBox;function d(n,t,i,r,o){const u=e.Cartesian3.subtract(n,t,a),s=e.Cartesian3.dot(i,u),c=e.Cartesian3.dot(r,u);return e.Cartesian2.fromElements(s,c,o)}r.validOutline=function(n){t.Check.defined("positions",n);const r=i.OrientedBoundingBox.fromPoints(n,c),a=r.halfAxes,d=e.Matrix3.getColumn(a,0,o),C=e.Matrix3.getColumn(a,1,u),l=e.Matrix3.getColumn(a,2,s),m=e.Cartesian3.magnitude(d),f=e.Cartesian3.magnitude(C),g=e.Cartesian3.magnitude(l);return!(0===m&&(0===f||0===g)||0===f&&0===g)},r.computeProjectTo2DArguments=function(n,r,a,d){t.Check.defined("positions",n),t.Check.defined("centerResult",r),t.Check.defined("planeAxis1Result",a),t.Check.defined("planeAxis2Result",d);const C=i.OrientedBoundingBox.fromPoints(n,c),l=C.halfAxes,m=e.Matrix3.getColumn(l,0,o),f=e.Matrix3.getColumn(l,1,u),g=e.Matrix3.getColumn(l,2,s),x=e.Cartesian3.magnitude(m),h=e.Cartesian3.magnitude(f),B=e.Cartesian3.magnitude(g),M=Math.min(x,h,B);if(0===x&&(0===h||0===B)||0===h&&0===B)return!1;let P,p;return M!==h&&M!==B||(P=m),M===x?P=f:M===B&&(p=f),M!==x&&M!==h||(p=g),e.Cartesian3.normalize(P,a),e.Cartesian3.normalize(p,d),e.Cartesian3.clone(C.center,r),!0},r.createProjectPointsTo2DFunction=function(n,e,t){return function(i){const r=new Array(i.length);for(let a=0;a