mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 21:31:47 -05:00
2 lines
599 B
JavaScript
2 lines
599 B
JavaScript
define(["exports","./RuntimeError-608565a6","./when-229515d6","./ComponentDatatype-692a36d3"],(function(e,n,t,i){"use strict";const d=i.CesiumMath.EPSILON10;e.arrayRemoveDuplicates=function(e,n,i,f){if(!t.defined(e))return;i=t.defaultValue(i,!1);const r=t.defined(f),u=e.length;if(u<2)return e;let s,a,l,o=e[0],c=0,h=-1;for(s=1;s<u;++s)a=e[s],n(o,a,d)?(t.defined(l)||(l=e.slice(0,s),c=s-1,h=0),r&&f.push(s)):(t.defined(l)&&(l.push(a),c=s,r&&(h=f.length)),o=a);return i&&n(e[0],e[u-1],d)&&(r&&(t.defined(l)?f.splice(h,0,c):f.push(u-1)),t.defined(l)?l.length-=1:l=e.slice(0,-1)),t.defined(l)?l:e}}));
|