PageSourceSearch

https://shubhamkshatriya25.github.io/assets/MathUtils-Bqtix1pt.js

js shubhamkshatriya25.github.io collected 2026-10-03 09:56:49 UTC 3,708 bytes, 1 lines download raw bytes

1import{c as e,d as t,f as n,h as r,i}from"./Constants-SPF2XdRE.js";var a;(function(e){e.bottom=`bottom`,e.bottomLeft=`bottom-left`,e.bottomRight=`bottom-right`,e.left=`left`,e.none=`none`,e.right=`right`,e.top=`top`,e.topLeft=`top-left`,e.topRight=`top-right`,e.outside=`outside`,e.inside=`inside`})(a||={});function o(e){return`z`in e?e.z:t.z}var s=class e{x;y;z;constructor(e=t.x,n=t.y,r=t.z){this.x=e,this.y=n,this.z=r}static get origin(){return e.create(t.x,t.y,t.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this.#e(e,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(e){this.#e(this.angle,e)}static clone(t){return e.create(t.x,t.y,o(t))}static create(n,r,i){return typeof n==`number`?new e(n,r??t.y,i??t.z):new e(n.x,n.y,o(n))}add(t){return e.create(this.x+t.x,this.y+t.y,this.z+o(t))}addTo(e){this.x+=e.x,this.y+=e.y,this.z+=o(e)}copy(){return e.clone(this)}div(t){return e.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return e.create(this.x*t,this.y*t,this.z*t)}multTo(e){this.x*=e,this.y*=e,this.z*=e}normalize(){let e=this.length;e!=0&&this.multTo(1/e)}rotate(n){return e.create(this.x*Math.cos(n)-this.y*Math.sin(n),this.x*Math.sin(n)+this.y*Math.cos(n),t.z)}setTo(e){this.x=e.x,this.y=e.y,this.z=o(e)}sub(t){return e.create(this.x-t.x,this.y-t.y,this.z-o(t))}subFrom(e){this.x-=e.x,this.y-=e.y,this.z-=o(e)}#e(e,t){this.x=Math.cos(e)*t,this.y=Math.sin(e)*t}},c=class e extends s{constructor(e=t.x,n=t.y){super(e,n,t.z)}static get origin(){return e.create(t.x,t.y)}static clone(t){return e.create(t.x,t.y)}
1static create(n,r){return typeof n==`number`?new e(n,r??t.y):new e(n.x,n.y)}};function l(e){return typeof e==`boolean`}function u(e){return typeof e==`string`}function d(e){return typeof e==`number`}function f(e){return typeof e==`object`&&!!e}function p(e){return Array.isArray(e)}function m(e){return e==null}var h=Math.PI/180,g=Math.random,_={nextFrame:e=>requestAnimationFrame(e),cancel:e=>{cancelAnimationFrame(e)}};function v(){return S(g(),0,1-2**-52)}function y(e,t){return v()*(t-e)+e}function b(e){return _.nextFrame(e)}function x(e){_.cancel(e)}function S(e,t,n){return Math.min(Math.max(e,t),n)}function C(e,t,n,r){return Math.floor((e*n+t*r)/(n+r))}function w(e){let t=D(e),n=E(e);return t===n&&(n=0),y(n,t)}function T(e){return d(e)?e:w(e)}function E(e){return d(e)?e:e.min}function D(e){return d(e)?e:e.max}function O(e,t){if(e===t||t===void 0&&d(e))return e;let n=E(e),r=D(e);return t===void 0?O(n,r):{min:Math.min(n,t),max:Math.max(r,t)}}function k(e,t){let n=e.x-t.x,r=e.y-t.y;return{dx:n,dy:r,distance:Math.hypot(n,r)}}function A(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function j(e,t){return Math.sqrt(A(e,t))}function M(e,t,n){return A(e,t)<=n*n}function N(e){return e*h}function P(t,o,s){if(d(t))return N(t);switch(t){case a.top:return-Math.PI*e;case a.topRight:return-Math.PI*n;case a.right:return 0;case a.bottomRight:return Math.PI*n;case a.bottom:return Math.PI*e;case a.bottomLeft:return Math.PI*r;case a.left:return Math.PI;case a.topLeft:return-Math.PI*r;case a.inside:return Math.atan2(s.y-o.y,s.x-o.x);case a.outside:return Math.atan2(o.y-s.y,o.x-s.x);default:return v()*i}}function F(e){let t=c.origin;return t.length=1,t.angle=e,t}function I(e,t,n,r){return c.create(e.x*(n-r)/(n+r)+t.x*2*r/(n+r),e.y)}function L(e){let{position:t,size:n}=e;return{x:t?.x??v()*n.width,y:t?.y??v()*n.height}}function R(e){return e?e.endsWith(`%`)?parseFloat(e)/100:parseFloat(e):1}export{m as C,c as D,u as E,s as O,l as S,f as T,C as _,S as a,O as b,j as c,P as d,v as f,T as g,E as h,M as i,a as k,k as l,D as m,L as n,I as o,y as p,x as r,N as s,b as t,F as u,R as v,d as w,p as x,w as y};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.