Socket
Socket
Sign inDemoInstall

@any-touch/vector

Package Overview
Dependencies
1
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3-2.0.3-alpha.1.0

2

dist/index.es.js

@@ -1,2 +0,2 @@

import{DIRECTION_RIGHT as r,DIRECTION_LEFT as t,DIRECTION_DOWN as n,DIRECTION_UP as u}from"@any-touch/shared";var a=function(r){return Math.sqrt(r.x*r.x+r.y*r.y)},o=function(r,t){return r.x*t.x+r.y*t.y},e=function(r,t){var n=a(r)*a(t);if(0===n)return 0;var u=o(r,t)/n;return u>1&&(u=1),Math.acos(u)},f=function(r,t){return r.x*t.y-t.x*r.y},i=function(r){return r/Math.PI*180},c=function(r,t){var n=e(r,t);return f(r,t)>0&&(n*=-1),i(n)},h=function(a,o){if(0!==a||0!==o)return Math.abs(a)>=Math.abs(o)?0<a?r:t:0<o?n:u};export{c as getAngle,f as getCross,h as getDirection,o as getDotProduct,e as getRadian,a as getVLength,i as radianToAngle};
import{DIRECTION_RIGHT as r,DIRECTION_LEFT as a,DIRECTION_DOWN as t,DIRECTION_UP as h}from"@any-touch/shared";var x=r=>Math.sqrt(r.x*r.x+r.y*r.y),y=(r,a)=>r.x*a.x+r.y*a.y,e=(r,a)=>{var t=x(r)*x(a);if(0===t)return 0;var h=y(r,a)/t;return h>1&&(h=1),Math.acos(h)},n=(r,a)=>r.x*a.y-a.x*r.y,o=r=>r/Math.PI*180,s=(r,a)=>{var t=e(r,a);return n(r,a)>0&&(t*=-1),o(t)},u=(x,y)=>{if(0!==x||0!==y)return Math.abs(x)>=Math.abs(y)?0<x?r:a:0<y?t:h};export{s as getAngle,n as getCross,u as getDirection,y as getDotProduct,e as getRadian,x as getVLength,o as radianToAngle};
//# sourceMappingURL=index.es.js.map
{
"name": "@any-touch/vector",
"version": "2.0.2",
"version": "2.0.3-2.0.3-alpha.1.0",
"description": "any-touch中向量计算相关的函数.",

@@ -10,3 +10,3 @@ "main": "dist/index.js",

"dependencies": {
"@any-touch/shared": "^2.0.2"
"@any-touch/shared": "^2.0.3-2.0.3-alpha.1.0"
},

@@ -20,3 +20,3 @@ "publishConfig": {

"sideEffects": false,
"gitHead": "7df4617ecb8b89c720ce9747cdd77554c4966a88"
"gitHead": "5fe455a5e75ea4301ae73b35afba7f3929b1f07c"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc