bimland/dist/Cesium/Workers/arrayRemoveDuplicates-d2f04...

2 lines
499 B
JavaScript
Raw Normal View History

2023-07-26 17:04:38 +08:00
define(["exports","./Check-7b2a090c","./when-b60132fc","./Math-119be1a3"],(function(e,t,r,a){"use strict";var n=a.CesiumMath.EPSILON10;e.arrayRemoveDuplicates=function(e,t,a,f){if(r.defined(e)){f=r.defaultValue(f,n),a=r.defaultValue(a,!1);var i,u,l,h=e.length;if(h<2)return e;for(i=1;i<h&&!t(u=e[i-1],l=e[i],f);++i);if(i===h)return a&&t(e[0],e[e.length-1],f)?e.slice(1):e;for(var c=e.slice(0,i);i<h;++i)t(u,l=e[i],f)||(c.push(l),u=l);return a&&c.length>1&&t(c[0],c[c.length-1],f)&&c.shift(),c}}}));