@any-touch/vector
Advanced tools
Comparing version 2.0.2 to 2.0.3-alpha.0
@@ -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-alpha.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-alpha.0" | ||
}, | ||
@@ -20,3 +20,3 @@ "publishConfig": { | ||
"sideEffects": false, | ||
"gitHead": "7df4617ecb8b89c720ce9747cdd77554c4966a88" | ||
"gitHead": "e53ab5c44a400b04b0de853a9358303007f67e8e" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7449
3