define(["exports","./when-54c2dc71","./Math-fc8cecf5","./Cartesian2-bddc1162","./arrayRemoveDuplicates-ebc732b0","./PolylinePipeline-8a1a1e4f"],function(e,P,A,C,w,b){"use strict";var i={};var M=new C.Cartographic,E=new C.Cartographic;function F(e,i,t,r){var a=(i=w.arrayRemoveDuplicates(i,C.Cartesian3.equalsEpsilon)).length;if(!(a<2)){var n=P.defined(r),o=P.defined(t),l=new Array(a),s=new Array(a),h=new Array(a),g=i[0];l[0]=g;var c=e.cartesianToCartographic(g,M);o&&(c.height=t[0]),s[0]=c.height,h[0]=n?r[0]:0;for(var p,u,d=s[0]===h[0],v=1,y=1;y