site/node_modules/robust-predicates/umd/insphere.min.js

2 lines
10 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).predicates={})}(this,(function(t){"use strict";const n=11102230246251565e-32,e=134217729,r=(3+8*n)*n;function o(t,n,e,r,o){let a,s,f,u,i=n[0],c=r[0],h=0,b=0;c>i==c>-i?(a=i,i=n[++h]):(a=c,c=r[++b]);let l=0;if(h<t&&b<e)for(c>i==c>-i?(s=i+a,f=a-(s-i),i=n[++h]):(s=c+a,f=a-(s-c),c=r[++b]),a=s,0!==f&&(o[l++]=f);h<t&&b<e;)c>i==c>-i?(s=a+i,u=s-a,f=a-(s-u)+(i-u),i=n[++h]):(s=a+c,u=s-a,f=a-(s-u)+(c-u),c=r[++b]),a=s,0!==f&&(o[l++]=f);for(;h<t;)s=a+i,u=s-a,f=a-(s-u)+(i-u),i=n[++h],a=s,0!==f&&(o[l++]=f);for(;b<e;)s=a+c,u=s-a,f=a-(s-u)+(c-u),c=r[++b],a=s,0!==f&&(o[l++]=f);return 0===a&&0!==l||(o[l++]=a),l}function a(t,n,e,r,a,s,f,u){return o(o(t,n,e,r,f),f,a,s,u)}function s(t,n,r,o){let a,s,f,u,i,c,h,b,l,M,d;h=e*r,M=h-(h-r),d=r-M;let p=n[0];a=p*r,h=e*p,b=h-(h-p),l=p-b,f=l*d-(a-b*M-l*M-b*d);let y=0;0!==f&&(o[y++]=f);for(let x=1;x<t;x++)p=n[x],u=p*r,h=e*p,b=h-(h-p),l=p-b,i=l*d-(u-b*M-l*M-b*d),s=a+i,c=s-a,f=a-(s-c)+(i-c),0!==f&&(o[y++]=f),a=u+s,f=s-(a-u),0!==f&&(o[y++]=f);return 0===a&&0!==y||(o[y++]=a),y}function f(t,n){for(let e=0;e<t;e++)n[e]=-n[e];return t}function u(t){return new Float64Array(t)}const i=5551115123125792e-31,c=8751425667295619e-46,h=u(4),b=u(4),l=u(4),M=u(4),d=u(4),p=u(4),y=u(4),x=u(4),g=u(4),m=u(4),T=u(24),j=u(24),w=u(24),A=u(24),F=u(24),k=u(24),q=u(24),v=u(24),z=u(24),B=u(24),C=u(1152),D=u(1152),E=u(1152),G=u(1152),H=u(1152),I=u(2304),J=u(2304),K=u(3456),L=u(5760),N=u(8),O=u(8),P=u(8),Q=u(16),R=u(24),S=u(48),U=u(48),V=u(96),W=u(192),X=u(384),Y=u(384),Z=u(384),$=u(768);function _(t,n,e,r,o,f,u){return a(s(4,t,r,N),N,s(4,n,o,O),O,s(4,e,f,P),P,Q,u)}function tt(t,n,e,r,u,i,c,h,b,l,M,d){const p=o(o(t,n,e,r,S),S,f(o(u,i,c,h,U),U),U,V);return a(s(s(p,V,b,W),W,b,X),X,s(s(p,V,l,W),W,l,Y),Y,s(s(p,V,M,W),W,M,Z),Z,$,d)}const nt=u(96),et=u(96),rt=u(96),ot=u(1152);function at(t,n,e,r,o,f,u,i,c,h){const b=_(t,n,e,r,o,f,R);return a(s(s(b,R,u,S),S,u,nt),nt,s(s(b,R,i,S),S,i,et),et,s(s(b,R,c,S),S,c,rt),rt,W,h)}function st(t,n,s,u,N,O,P,Q,R,S,U,V,W,X,Y,Z){let $,nt,et,rt,st,ft,ut,it,ct,ht,bt,lt,Mt,dt,pt,yt,xt,gt,mt,Tt,jt,wt,At,Ft,kt,qt,vt,zt,Bt,Ct,Dt;const Et=t-W,Gt=u-W,Ht=P-W,It=S-W,Jt=n-X,Kt=N-X,Lt=Q-X,Nt=U-X,Ot=s-Y,Pt=O-Y,Qt=R-Y,Rt=V-Y;zt=Et*Kt,Tt=e*Et,jt=Tt-(Tt-Et),wt=Et-jt,Tt=e*Kt,At=Tt-(Tt-Kt),Ft=Kt-At,Bt=wt*Ft-(zt-jt*At-wt*At-jt*Ft),Ct=Gt*Jt,Tt=e*Gt,jt=Tt-(Tt-Gt),wt=Gt-jt,Tt=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