define(["exports","./buildModuleUrl-8cce5713","./Cartesian4-b0ddc4ba","./Check-7b2a090c","./OrientedBoundingBox-a6c2fb0f"],(function(n,t,e,r,a){"use strict";var i={},o=new e.Cartesian3,u=new e.Cartesian3,s=new e.Cartesian3,c=new e.Cartesian3,C=new a.OrientedBoundingBox;function d(n,r,a,i,u){var s=e.Cartesian3.subtract(n,r,o),c=e.Cartesian3.dot(a,s),C=e.Cartesian3.dot(i,s);return t.Cartesian2.fromElements(c,C,u)}i.validOutline=function(n){var r=a.OrientedBoundingBox.fromPoints(n,C).halfAxes,i=t.Matrix3.getColumn(r,0,u),o=t.Matrix3.getColumn(r,1,s),d=t.Matrix3.getColumn(r,2,c),m=e.Cartesian3.magnitude(i),l=e.Cartesian3.magnitude(o),g=e.Cartesian3.magnitude(d);return!(0===m&&(0===l||0===g)||0===l&&0===g)},i.computeProjectTo2DArguments=function(n,r,i,o){var d,m,l=a.OrientedBoundingBox.fromPoints(n,C),g=l.halfAxes,f=t.Matrix3.getColumn(g,0,u),x=t.Matrix3.getColumn(g,1,s),B=t.Matrix3.getColumn(g,2,c),M=e.Cartesian3.magnitude(f),P=e.Cartesian3.magnitude(x),b=e.Cartesian3.magnitude(B),h=Math.min(M,P,b);return(0!==M||0!==P&&0!==b)&&(0!==P||0!==b)&&(h!==P&&h!==b||(d=f),h===M?d=x:h===b&&(m=x),h!==M&&h!==P||(m=B),e.Cartesian3.normalize(d,i),e.Cartesian3.normalize(m,o),e.Cartesian3.clone(l.center,r),!0)},i.createProjectPointsTo2DFunction=function(n,t,e){return function(r){for(var a=new Array(r.length),i=0;i<r.length;i++)a[i]=d(r[i],n,t,e);return a}},i.createProjectPointTo2DFunction=function(n,t,e){return function(r,a){return d(r,n,t,e,a)}},n.CoplanarPolygonGeometryLibrary=i}));
