All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.umd.orient2d.min.js Maven / Gradle / Ivy

The newest version!
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).predicates={})}(this,(function(t){"use strict";const e=134217729;function n(t,e,n,o,r){let f,i,u,s,c=e[0],l=o[0],a=0,d=0;l>c==l>-c?(f=c,c=e[++a]):(f=l,l=o[++d]);let p=0;if(ac==l>-c?(i=c+f,u=f-(i-c),c=e[++a]):(i=l+f,u=f-(i-l),l=o[++d]),f=i,0!==u&&(r[p++]=u);ac==l>-c?(i=f+c,s=i-f,u=f-(i-s)+(c-s),c=e[++a]):(i=f+l,s=i-f,u=f-(i-s)+(l-s),l=o[++d]),f=i,0!==u&&(r[p++]=u);for(;a0!=b>0)return h;const y=Math.abs(p+b);return Math.abs(h)>=33306690738754716e-32*y?h:-function(t,o,c,l,a,d,p){let b,h,y,M,x,g,j,m,T,_,v,w,A,F,O,P,k,q;const z=t-a,B=c-a,C=o-d,D=l-d;F=z*D,g=e*z,j=g-(g-z),m=z-j,g=e*D,T=g-(g-D),_=D-T,O=m*_-(F-j*T-m*T-j*_),P=C*B,g=e*C,j=g-(g-C),m=C-j,g=e*B,T=g-(g-B),_=B-T,k=m*_-(P-j*T-m*T-j*_),v=O-k,x=O-v,r[0]=O-(v+x)+(x-k),w=F+v,x=w-F,A=F-(w-x)+(v-x),v=A-P,x=A-v,r[1]=A-(v+x)+(x-P),q=w+v,x=q-w,r[2]=w-(q-x)+(v-x),r[3]=q;let E=function(t,e){let n=e[0];for(let o=1;o=G||-E>=G)return E;if(x=t-z,b=t-(z+x)+(x-a),x=c-B,y=c-(B+x)+(x-a),x=o-C,h=o-(C+x)+(x-d),x=l-D,M=l-(D+x)+(x-d),0===b&&0===h&&0===y&&0===M)return E;if(G=11093356479670487e-47*p+33306690738754706e-32*Math.abs(E),E+=z*M+D*b-(C*y+B*h),E>=G||-E>=G)return E;F=b*D,g=e*b,j=g-(g-b),m=b-j,g=e*D,T=g-(g-D),_=D-T,O=m*_-(F-j*T-m*T-j*_),P=h*B,g=e*h,j=g-(g-h),m=h-j,g=e*B,T=g-(g-B),_=B-T,k=m*_-(P-j*T-m*T-j*_),v=O-k,x=O-v,s[0]=O-(v+x)+(x-k),w=F+v,x=w-F,A=F-(w-x)+(v-x),v=A-P,x=A-v,s[1]=A-(v+x)+(x-P),q=w+v,x=q-w,s[2]=w-(q-x)+(v-x),s[3]=q;const H=n(4,r,4,s,f);F=z*M,g=e*z,j=g-(g-z),m=z-j,g=e*M,T=g-(g-M),_=M-T,O=m*_-(F-j*T-m*T-j*_),P=C*y,g=e*C,j=g-(g-C),m=C-j,g=e*y,T=g-(g-y),_=y-T,k=m*_-(P-j*T-m*T-j*_),v=O-k,x=O-v,s[0]=O-(v+x)+(x-k),w=F+v,x=w-F,A=F-(w-x)+(v-x),v=A-P,x=A-v,s[1]=A-(v+x)+(x-P),q=w+v,x=q-w,s[2]=w-(q-x)+(v-x),s[3]=q;const I=n(H,f,4,s,i);F=b*M,g=e*b,j=g-(g-b),m=b-j,g=e*M,T=g-(g-M),_=M-T,O=m*_-(F-j*T-m*T-j*_),P=h*y,g=e*h,j=g-(g-h),m=h-j,g=e*y,T=g-(g-y),_=y-T,k=m*_-(P-j*T-m*T-j*_),v=O-k,x=O-v,s[0]=O-(v+x)+(x-k),w=F+v,x=w-F,A=F-(w-x)+(v-x),v=A-P,x=A-v,s[1]=A-(v+x)+(x-P),q=w+v,x=q-w,s[2]=w-(q-x)+(v-x),s[3]=q;const J=n(I,i,4,s,u);return u[J-1]}(t,o,c,l,a,d,y)},t.orient2dfast=function(t,e,n,o,r,f){return(e-f)*(n-r)-(t-r)*(o-f)},Object.defineProperty(t,"__esModule",{value:!0})}));




© 2015 - 2024 Weber Informatics LLC | Privacy Policy