1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-19 03:16:38 -04:00
sdrangel/plugins/feature/map/Cesium/Workers/ComponentDatatype-692a36d3.js

2 lines
8.3 KiB
JavaScript
Raw Normal View History

2022-02-04 15:41:22 -05:00
define(["exports","./RuntimeError-608565a6","./when-229515d6","./WebGLConstants-f63312fc"],(function(t,n,r,e){"use strict";var a=function(t){null==t&&(t=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};a.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},a.prototype.init_by_array=function(t,n){var r,e,a;for(this.init_seed(19650218),r=1,e=0,a=this.N>n?this.N:n;a;a--){var i=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1664525*((4294901760&i)>>>16)<<16)+1664525*(65535&i))+t[e]+e,this.mt[r]>>>=0,e++,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),e>=n&&(e=0)}for(a=this.N-1;a;a--){i=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1566083941*((4294901760&i)>>>16)<<16)+1566083941*(65535&i))-r,this.mt[r]>>>=0,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1)}this.mt[0]=2147483648},a.prototype.random_int=function(){var t,n=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_seed(5489),r=0;r<this.N-this.M;r++)t=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+this.M]^t>>>1^n[1&t];for(;r<this.N-1;r++)t=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+(this.M-this.N)]^t>>>1^n[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^n[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,(t^=t>>>18)>>>0},a.prototype.random_int31=function(){return this.random_int()>>>1},a.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},a.prototype.random=function(){return this.random_int()*(1/4294967296)},a.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},a.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)};var i=a;const s={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};s.sign=r.defaultValue(Math.sign,(function(t){return 0===(t=+t)||t!=t?t:t>0?1:-1})),s.signNotZero=function(t){return t<0?-1:1},s.toSNorm=function(t,n){return n=r.defaultValue(n,255),Math.round((.5*s.clamp(t,-1,1)+.5)*n)},s.fromSNorm=function(t,n){return n=r.defaultValue(n,255),s.clamp(t,0,n)/n*2-1},s.normalize=function(t,n,r){return 0===(r=Math.max(r-n,0))?0:s.clamp((t-n)/r,0,1)},s.sinh=r.defaultValue(Math.sinh,(function(t){return(Math.exp(t)-Math.exp(-t))/2})),s.cosh=r.defaultValue(Math.cosh,(function(t){return(Math.exp(t)+Math.exp(-t))/2})),s.lerp=function(t,n,r){return(1-r)*t+r*n},s.PI=Math.PI,s.ONE_OVER_PI=1/Math.PI,s.PI_OVER_TWO=Math.PI/2,s.PI_OVER_THREE=Math.PI/3,s.PI_OVER_FOUR=Math.PI/4,s.PI_OVER_SIX=Math.PI/6,s.THREE_PI_OVER_TWO=3*Math.PI/2,s.TWO_PI=2*Math.PI,s.ONE_OVER_TWO_PI=1/(2*Math.PI),s.RADIANS_PER_DEGREE=Math.PI/180,s.DEGREES_PER_RADIAN=180/Math.PI,s.RADIANS_PER_ARCSECOND=s.RADIANS_PER_DEGREE/3600,s.toRadians=function(t){return t*s.RADIANS_PER_DEGREE},s.toDegrees=function(t){return t*s.DEGREES_PER_RADIAN},s.convertLongitudeRange=function(t){const n=s.TWO_PI,r=t-Math.floor(t/n)*n;return r<-Math.PI?r+n:r>=Math.PI?r-n:r},s.clampToLatitudeRange=function(t){return s.clamp(t,-1*s.PI_OVER_TWO,s.PI_OVER_TWO)},s.negativePiToPi=function(t){return t>=-s.PI&&t<=s.PI?t:s.zeroToTwoPi(t+s.PI)-s.PI},s.zeroToTwoPi=function(t){if(t>=0&&t<=s.TWO_PI)return t;const n=s.mod(t,s.TWO_PI);return Math.abs(