You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Application-Web/outputs/public/front/components/arrows/Box.ts-eca59774.js

2 lines
354 B

function i(...n){const t=n.map(c=>c.x),a=n.map(c=>c.y),r=Math.min(...t),u=Math.min(...a),y=Math.max(...t)-r,h=Math.max(...a)-u;return{x:r,y:u,width:y,height:h}}function m(n,t,a){return{x:n.x+t/2,y:n.y+a/2,width:t,height:a}}function s(n,t){return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}export{i as boundsOf,s as contains,m as surrounds};