curvy 1.0.9 → 2.0.0-alpha.2
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.
- package/dist/characteristic/index.d.mts +88 -0
- package/dist/characteristic/index.mjs +2 -0
- package/dist/curve/index.d.mts +2 -0
- package/dist/curve/index.mjs +2 -0
- package/dist/interval/index.d.mts +3 -0
- package/dist/interval/index.mjs +3 -0
- package/dist/matrix/index.d.mts +2 -0
- package/dist/matrix/index.mjs +267 -0
- package/dist/matrix/index.mjs.map +1 -0
- package/dist/number.d.mts +280 -0
- package/dist/number.mjs +140 -0
- package/dist/number.mjs.map +1 -0
- package/dist/path/index.d.mts +261 -0
- package/dist/path/index.mjs +325 -0
- package/dist/path/index.mjs.map +1 -0
- package/dist/polynomial/index.d.mts +2 -0
- package/dist/polynomial/index.mjs +3 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs +104 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs.map +1 -0
- package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
- package/dist/shared/cubic-BajUY0JT.d.mts +1100 -0
- package/dist/shared/cubic-CpHAx8cC.mjs +479 -0
- package/dist/shared/cubic-CpHAx8cC.mjs.map +1 -0
- package/dist/shared/interval-05CR6eBf.mjs +421 -0
- package/dist/shared/interval-05CR6eBf.mjs.map +1 -0
- package/dist/shared/interval-Dy-RMEE3.d.mts +533 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs +108 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs.map +1 -0
- package/dist/shared/interval2d-C2id9u31.d.mts +172 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
- package/dist/shared/matrix4x4-Dm_tSiH1.d.mts +1183 -0
- package/dist/shared/quadratic-CamozcFc.mjs +330 -0
- package/dist/shared/quadratic-CamozcFc.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-B6g97ryJ.d.mts +308 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs +295 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs +695 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-DlQfBURs.d.mts +818 -0
- package/dist/shared/solution-CrtLfqEq.mjs +306 -0
- package/dist/shared/solution-CrtLfqEq.mjs.map +1 -0
- package/dist/shared/solution-sNQ-ZVhN.d.mts +251 -0
- package/dist/{pipe.d.mts → shared/utils-MCckigYk.d.mts} +44 -26
- package/dist/shared/vector2-CL1HDdPr.mjs +187 -0
- package/dist/shared/vector2-CL1HDdPr.mjs.map +1 -0
- package/dist/shared/vector2-DPUY3_eA.d.mts +470 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs +97 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs.map +1 -0
- package/dist/shared/vector3-D-tv_aKL.mjs +204 -0
- package/dist/shared/vector3-D-tv_aKL.mjs.map +1 -0
- package/dist/shared/vector3-DqeOZtOB.d.mts +703 -0
- package/dist/shared/vector4-5KbjoHVj.mjs +109 -0
- package/dist/shared/vector4-5KbjoHVj.mjs.map +1 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs +163 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs.map +1 -0
- package/dist/solution/index.d.mts +2 -0
- package/dist/solution/index.mjs +2 -0
- package/dist/splines/index.d.mts +701 -0
- package/dist/splines/index.mjs +734 -0
- package/dist/splines/index.mjs.map +1 -0
- package/dist/utils.d.mts +2 -205
- package/dist/utils.mjs +88 -52
- package/dist/utils.mjs.map +1 -1
- package/dist/vector/index.d.mts +3 -0
- package/dist/vector/index.mjs +4 -0
- package/package.json +49 -92
- package/dist/curve/cubic2d.d.mts +0 -109
- package/dist/curve/cubic2d.d.ts +0 -109
- package/dist/curve/cubic2d.mjs +0 -80
- package/dist/curve/cubic2d.mjs.map +0 -1
- package/dist/curve/linear2d.d.mts +0 -94
- package/dist/curve/linear2d.d.ts +0 -94
- package/dist/curve/linear2d.mjs +0 -46
- package/dist/curve/linear2d.mjs.map +0 -1
- package/dist/curve/quadratic2d.d.mts +0 -117
- package/dist/curve/quadratic2d.d.ts +0 -117
- package/dist/curve/quadratic2d.mjs +0 -82
- package/dist/curve/quadratic2d.mjs.map +0 -1
- package/dist/interval.d.mts +0 -251
- package/dist/interval.d.ts +0 -251
- package/dist/interval.mjs +0 -86
- package/dist/interval.mjs.map +0 -1
- package/dist/matrix/matrix2x2.d.mts +0 -320
- package/dist/matrix/matrix2x2.d.ts +0 -320
- package/dist/matrix/matrix2x2.mjs +0 -25
- package/dist/matrix/matrix2x2.mjs.map +0 -1
- package/dist/matrix/matrix3x3.d.mts +0 -370
- package/dist/matrix/matrix3x3.d.ts +0 -370
- package/dist/matrix/matrix3x3.mjs +0 -28
- package/dist/matrix/matrix3x3.mjs.map +0 -1
- package/dist/matrix/matrix4x4.d.mts +0 -381
- package/dist/matrix/matrix4x4.d.ts +0 -381
- package/dist/matrix/matrix4x4.mjs +0 -178
- package/dist/matrix/matrix4x4.mjs.map +0 -1
- package/dist/path/cubic2d.d.mts +0 -95
- package/dist/path/cubic2d.d.ts +0 -95
- package/dist/path/cubic2d.mjs +0 -60
- package/dist/path/cubic2d.mjs.map +0 -1
- package/dist/path/linear2d.d.mts +0 -95
- package/dist/path/linear2d.d.ts +0 -95
- package/dist/path/linear2d.mjs +0 -53
- package/dist/path/linear2d.mjs.map +0 -1
- package/dist/path/quadratic2d.d.mts +0 -95
- package/dist/path/quadratic2d.d.ts +0 -95
- package/dist/path/quadratic2d.mjs +0 -57
- package/dist/path/quadratic2d.mjs.map +0 -1
- package/dist/pipe.d.ts +0 -58
- package/dist/pipe.mjs +0 -92
- package/dist/pipe.mjs.map +0 -1
- package/dist/polynomial/cubic.d.mts +0 -7
- package/dist/polynomial/cubic.d.ts +0 -7
- package/dist/polynomial/cubic.mjs +0 -133
- package/dist/polynomial/cubic.mjs.map +0 -1
- package/dist/polynomial/linear.d.mts +0 -7
- package/dist/polynomial/linear.d.ts +0 -7
- package/dist/polynomial/linear.mjs +0 -24
- package/dist/polynomial/linear.mjs.map +0 -1
- package/dist/polynomial/quadratic.d.mts +0 -7
- package/dist/polynomial/quadratic.d.ts +0 -7
- package/dist/polynomial/quadratic.mjs +0 -27
- package/dist/polynomial/quadratic.mjs.map +0 -1
- package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
- package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
- package/dist/shared/curvy.BkkW8Tx9.mjs +0 -102
- package/dist/shared/curvy.BkkW8Tx9.mjs.map +0 -1
- package/dist/shared/curvy.BxdGW9he.mjs +0 -116
- package/dist/shared/curvy.BxdGW9he.mjs.map +0 -1
- package/dist/shared/curvy.C_sCeg9J.mjs +0 -66
- package/dist/shared/curvy.C_sCeg9J.mjs.map +0 -1
- package/dist/shared/curvy.Cg8lZVUz.d.ts +0 -688
- package/dist/shared/curvy.DCt1gGII.mjs +0 -147
- package/dist/shared/curvy.DCt1gGII.mjs.map +0 -1
- package/dist/shared/curvy.DJ4xO0al.mjs +0 -63
- package/dist/shared/curvy.DJ4xO0al.mjs.map +0 -1
- package/dist/shared/curvy.DmVFTi0N.mjs +0 -35
- package/dist/shared/curvy.DmVFTi0N.mjs.map +0 -1
- package/dist/shared/curvy.FDaj5rlj.d.mts +0 -688
- package/dist/shared/curvy.lktriTpx.mjs +0 -101
- package/dist/shared/curvy.lktriTpx.mjs.map +0 -1
- package/dist/shared/curvy.mLFprrGm.mjs +0 -85
- package/dist/shared/curvy.mLFprrGm.mjs.map +0 -1
- package/dist/shared/curvy.r6f1j287.mjs +0 -76
- package/dist/shared/curvy.r6f1j287.mjs.map +0 -1
- package/dist/splines/basis2d.d.mts +0 -130
- package/dist/splines/basis2d.d.ts +0 -130
- package/dist/splines/basis2d.mjs +0 -90
- package/dist/splines/basis2d.mjs.map +0 -1
- package/dist/splines/bezier2d.d.mts +0 -182
- package/dist/splines/bezier2d.d.ts +0 -182
- package/dist/splines/bezier2d.mjs +0 -23
- package/dist/splines/bezier2d.mjs.map +0 -1
- package/dist/splines/cardinal2d.d.mts +0 -178
- package/dist/splines/cardinal2d.d.ts +0 -178
- package/dist/splines/cardinal2d.mjs +0 -114
- package/dist/splines/cardinal2d.mjs.map +0 -1
- package/dist/splines/hermite2d.d.mts +0 -124
- package/dist/splines/hermite2d.d.ts +0 -124
- package/dist/splines/hermite2d.mjs +0 -63
- package/dist/splines/hermite2d.mjs.map +0 -1
- package/dist/utils.d.ts +0 -205
- package/dist/vector/vector2.d.mts +0 -324
- package/dist/vector/vector2.d.ts +0 -324
- package/dist/vector/vector2.mjs +0 -30
- package/dist/vector/vector2.mjs.map +0 -1
- package/dist/vector/vector3.d.mts +0 -417
- package/dist/vector/vector3.d.ts +0 -417
- package/dist/vector/vector3.mjs +0 -38
- package/dist/vector/vector3.mjs.map +0 -1
- package/dist/vector/vector4.d.mts +0 -205
- package/dist/vector/vector4.d.ts +0 -205
- package/dist/vector/vector4.mjs +0 -20
- package/dist/vector/vector4.mjs.map +0 -1
package/dist/vector/vector4.d.ts
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { f as FourDimensional } from '../shared/curvy.Bf5TIk31.js';
|
|
2
|
-
import { Pipeable } from '../pipe.js';
|
|
3
|
-
|
|
4
|
-
declare const Vector4TypeId: unique symbol;
|
|
5
|
-
type Vector4TypeId = typeof Vector4TypeId;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A 4D vector.
|
|
9
|
-
*
|
|
10
|
-
* All fields are readonly and immutable, and all operations create new instances.
|
|
11
|
-
*
|
|
12
|
-
* @since 1.0.0
|
|
13
|
-
*/
|
|
14
|
-
interface Vector4 extends Pipeable, FourDimensional<number> {
|
|
15
|
-
readonly [Vector4TypeId]: Vector4TypeId;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Checks if a value is a `Vector4`.
|
|
19
|
-
*
|
|
20
|
-
* @param v - The value to check.
|
|
21
|
-
* @returns `true` if the value is a `Vector4`, `false` otherwise.
|
|
22
|
-
* @since 1.0.0
|
|
23
|
-
*/
|
|
24
|
-
declare const isVector4: (v: unknown) => v is Vector4;
|
|
25
|
-
declare const make: {
|
|
26
|
-
/**
|
|
27
|
-
* Creates a new `Vector4` instance.
|
|
28
|
-
*
|
|
29
|
-
* @param xyzw - The x, y, z, and w components of the vector.
|
|
30
|
-
* @returns A new `Vector4` instance.
|
|
31
|
-
* @since 1.0.0
|
|
32
|
-
*/
|
|
33
|
-
(xyzw: number): Vector4;
|
|
34
|
-
/**
|
|
35
|
-
* Creates a new `Vector4` instance.
|
|
36
|
-
*
|
|
37
|
-
* @param x - The x component of the vector.
|
|
38
|
-
* @param yzw - The y, z, and w components of the vector.
|
|
39
|
-
* @returns A new `Vector4` instance.
|
|
40
|
-
* @since 1.0.0
|
|
41
|
-
*/
|
|
42
|
-
(x: number, yzw: number): Vector4;
|
|
43
|
-
/**
|
|
44
|
-
* Creates a new `Vector4` instance.
|
|
45
|
-
*
|
|
46
|
-
* @param x - The x component of the vector.
|
|
47
|
-
* @param y - The y component of the vector.
|
|
48
|
-
* @param zw - The z and w components of the vector.
|
|
49
|
-
* @returns A new `Vector4` instance.
|
|
50
|
-
* @since 1.0.0
|
|
51
|
-
*/
|
|
52
|
-
(x: number, y: number, zw: number): Vector4;
|
|
53
|
-
/**
|
|
54
|
-
* Creates a new `Vector4` instance.
|
|
55
|
-
*
|
|
56
|
-
* @param x - The x component of the vector.
|
|
57
|
-
* @param y - The y component of the vector.
|
|
58
|
-
* @param z - The z component of the vector.
|
|
59
|
-
* @param w - The w component of the vector.
|
|
60
|
-
* @returns A new `Vector4` instance.
|
|
61
|
-
* @since 1.0.0
|
|
62
|
-
*/
|
|
63
|
-
(x: number, y: number, z: number, w: number): Vector4;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Gets the magnitude of a `Vector4`.
|
|
67
|
-
*
|
|
68
|
-
* @param vector - The vector to calculate the magnitude of.
|
|
69
|
-
* @returns The magnitude of the vector.
|
|
70
|
-
* @since 1.0.0
|
|
71
|
-
*/
|
|
72
|
-
declare const magnitude: (vector: Vector4) => number;
|
|
73
|
-
/**
|
|
74
|
-
* Normalizes a `Vector4`.
|
|
75
|
-
*
|
|
76
|
-
* @param vector - The vector to normalize.
|
|
77
|
-
* @returns A new `Vector4` instance with the same direction as the input vector but with a magnitude of 1.
|
|
78
|
-
* @since 1.0.0
|
|
79
|
-
*/
|
|
80
|
-
declare const normalize: (vector: Vector4) => Vector4;
|
|
81
|
-
declare const dot: {
|
|
82
|
-
/**
|
|
83
|
-
* Computes the dot product of two `Vector4` instances.
|
|
84
|
-
*
|
|
85
|
-
* @param a - The first vector.
|
|
86
|
-
* @param b - The second vector.
|
|
87
|
-
* @returns The dot product of the two vectors.
|
|
88
|
-
* @since 1.0.0
|
|
89
|
-
*/
|
|
90
|
-
(a: Vector4, b: Vector4): number;
|
|
91
|
-
/**
|
|
92
|
-
* Computes the dot product of a `Vector4` instance and another vector.
|
|
93
|
-
*
|
|
94
|
-
* @param b - The second vector.
|
|
95
|
-
* @returns A function that takes the first vector and returns the dot product.
|
|
96
|
-
* @since 1.0.0
|
|
97
|
-
*/
|
|
98
|
-
(b: Vector4): (a: Vector4) => number;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Returns the components of a `Vector4` as an array.
|
|
102
|
-
*
|
|
103
|
-
* @param v - The vector to get the components of.
|
|
104
|
-
* @returns An array containing the x, y, z, and w components of the vector.
|
|
105
|
-
* @since 1.0.0
|
|
106
|
-
*/
|
|
107
|
-
declare const components: (v: Vector4) => [number, number, number, number];
|
|
108
|
-
/**
|
|
109
|
-
* Applies the softmax function to a `Vector4`.
|
|
110
|
-
*
|
|
111
|
-
* @param v - The vector to calculate the softmax of.
|
|
112
|
-
* @returns A new `Vector4` instance representing the softmax of the input vector.
|
|
113
|
-
*/
|
|
114
|
-
declare const softmax: (v: Vector4) => Vector4;
|
|
115
|
-
/**
|
|
116
|
-
* Creates a zero vector.
|
|
117
|
-
*
|
|
118
|
-
* @since 1.0.0
|
|
119
|
-
*/
|
|
120
|
-
declare const zero: Vector4;
|
|
121
|
-
/**
|
|
122
|
-
* Creates a unit vector.
|
|
123
|
-
*
|
|
124
|
-
* @since 1.0.0
|
|
125
|
-
*/
|
|
126
|
-
declare const unit: Vector4;
|
|
127
|
-
declare const add: {
|
|
128
|
-
/**
|
|
129
|
-
* Adds two `Vector4` instances.
|
|
130
|
-
*
|
|
131
|
-
* @param a - The first vector.
|
|
132
|
-
* @param b - The second vector.
|
|
133
|
-
* @returns A new `Vector4` instance representing the sum of the two vectors.
|
|
134
|
-
* @since 1.0.0
|
|
135
|
-
*/
|
|
136
|
-
(a: Vector4, b: Vector4): Vector4;
|
|
137
|
-
/**
|
|
138
|
-
* Adds a `Vector4` instance to another vector.
|
|
139
|
-
*
|
|
140
|
-
* @param b - The second vector.
|
|
141
|
-
* @returns A function that takes the first vector and returns the sum.
|
|
142
|
-
* @since 1.0.0
|
|
143
|
-
*/
|
|
144
|
-
(b: Vector4): (a: Vector4) => Vector4;
|
|
145
|
-
};
|
|
146
|
-
declare const subtract: {
|
|
147
|
-
/**
|
|
148
|
-
* Subtracts one `Vector4` instance from another.
|
|
149
|
-
*
|
|
150
|
-
* @param a - The first vector.
|
|
151
|
-
* @param b - The second vector.
|
|
152
|
-
* @returns A new `Vector4` instance representing the difference of the two vectors.
|
|
153
|
-
* @since 1.0.0
|
|
154
|
-
*/
|
|
155
|
-
(a: Vector4, b: Vector4): Vector4;
|
|
156
|
-
/**
|
|
157
|
-
* Subtracts a `Vector4` instance from another vector.
|
|
158
|
-
*
|
|
159
|
-
* @param b - The second vector.
|
|
160
|
-
* @returns A function that takes the first vector and returns the difference.
|
|
161
|
-
* @since 1.0.0
|
|
162
|
-
*/
|
|
163
|
-
(b: Vector4): (a: Vector4) => Vector4;
|
|
164
|
-
};
|
|
165
|
-
declare const hadamard: {
|
|
166
|
-
/**
|
|
167
|
-
* Computes the Hadamard product of two `Vector4` instances.
|
|
168
|
-
*
|
|
169
|
-
* @param a - The first vector.
|
|
170
|
-
* @param b - The second vector.
|
|
171
|
-
* @returns A new `Vector4` instance representing the Hadamard product of the two vectors.
|
|
172
|
-
* @since 1.0.0
|
|
173
|
-
*/
|
|
174
|
-
(a: Vector4, b: Vector4): Vector4;
|
|
175
|
-
/**
|
|
176
|
-
* Computes the Hadamard product of a `Vector4` instance and another vector.
|
|
177
|
-
*
|
|
178
|
-
* @param b - The second vector.
|
|
179
|
-
* @returns A function that takes the first vector and returns the Hadamard product.
|
|
180
|
-
* @since 1.0.0
|
|
181
|
-
*/
|
|
182
|
-
(b: Vector4): (a: Vector4) => Vector4;
|
|
183
|
-
};
|
|
184
|
-
declare const scale: {
|
|
185
|
-
/**
|
|
186
|
-
* Scales a `Vector4` by a scalar.
|
|
187
|
-
*
|
|
188
|
-
* @param s - The scalar to scale the vector by.
|
|
189
|
-
* @returns A function that takes the vector and returns the scaled vector.
|
|
190
|
-
* @since 1.0.0
|
|
191
|
-
*/
|
|
192
|
-
(s: number): (v: Vector4) => Vector4;
|
|
193
|
-
/**
|
|
194
|
-
* Scales a `Vector4` by a scalar.
|
|
195
|
-
*
|
|
196
|
-
* @param s - The scalar to scale the vector by.
|
|
197
|
-
* @param v - The vector to scale.
|
|
198
|
-
* @returns A new `Vector4` instance representing the scaled vector.
|
|
199
|
-
* @since 1.0.0
|
|
200
|
-
*/
|
|
201
|
-
(v: Vector4, s: number): Vector4;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, unit, zero };
|
|
205
|
-
export type { Vector4 };
|
package/dist/vector/vector4.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { m as make$1, i as isVector4$1, a as magnitude$1, n as normalize$1, d as dot$1, c as components$1, s as softmax$1, b as add$1, e as subtract$1, h as hadamard$1, f as scale$1 } from '../shared/curvy.C_sCeg9J.mjs';
|
|
2
|
-
import '../pipe.mjs';
|
|
3
|
-
import '../utils.mjs';
|
|
4
|
-
|
|
5
|
-
const isVector4 = isVector4$1;
|
|
6
|
-
const make = make$1;
|
|
7
|
-
const magnitude = magnitude$1;
|
|
8
|
-
const normalize = normalize$1;
|
|
9
|
-
const dot = dot$1;
|
|
10
|
-
const components = components$1;
|
|
11
|
-
const softmax = softmax$1;
|
|
12
|
-
const zero = make(0);
|
|
13
|
-
const unit = make(1);
|
|
14
|
-
const add = add$1;
|
|
15
|
-
const subtract = subtract$1;
|
|
16
|
-
const hadamard = hadamard$1;
|
|
17
|
-
const scale = scale$1;
|
|
18
|
-
|
|
19
|
-
export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, unit, zero };
|
|
20
|
-
//# sourceMappingURL=vector4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector4.mjs","sources":["../../src/vector/vector4.ts"],"sourcesContent":["import type { FourDimensional } from '../dimensions'\nimport type { Pipeable } from '../pipe'\nimport * as internal from './vector4.internal'\nimport type { Vector4TypeId } from './vector4.internal'\n\n/**\n * A 4D vector.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface Vector4 extends Pipeable, FourDimensional<number> {\n readonly [Vector4TypeId]: Vector4TypeId\n}\n\n/**\n * Checks if a value is a `Vector4`.\n *\n * @param v - The value to check.\n * @returns `true` if the value is a `Vector4`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isVector4: (v: unknown) => v is Vector4 = internal.isVector4\n\nexport const make: {\n /**\n * Creates a new `Vector4` instance.\n *\n * @param xyzw - The x, y, z, and w components of the vector.\n * @returns A new `Vector4` instance.\n * @since 1.0.0\n */\n (xyzw: number): Vector4\n /**\n * Creates a new `Vector4` instance.\n *\n * @param x - The x component of the vector.\n * @param yzw - The y, z, and w components of the vector.\n * @returns A new `Vector4` instance.\n * @since 1.0.0\n */\n (x: number, yzw: number): Vector4\n /**\n * Creates a new `Vector4` instance.\n *\n * @param x - The x component of the vector.\n * @param y - The y component of the vector.\n * @param zw - The z and w components of the vector.\n * @returns A new `Vector4` instance.\n * @since 1.0.0\n */\n (x: number, y: number, zw: number): Vector4\n /**\n * Creates a new `Vector4` instance.\n *\n * @param x - The x component of the vector.\n * @param y - The y component of the vector.\n * @param z - The z component of the vector.\n * @param w - The w component of the vector.\n * @returns A new `Vector4` instance.\n * @since 1.0.0\n */\n (x: number, y: number, z: number, w: number): Vector4\n} = internal.make\n\n/**\n * Gets the magnitude of a `Vector4`.\n *\n * @param vector - The vector to calculate the magnitude of.\n * @returns The magnitude of the vector.\n * @since 1.0.0\n */\nexport const magnitude: (vector: Vector4) => number = internal.magnitude\n\n/**\n * Normalizes a `Vector4`.\n *\n * @param vector - The vector to normalize.\n * @returns A new `Vector4` instance with the same direction as the input vector but with a magnitude of 1.\n * @since 1.0.0\n */\nexport const normalize: (vector: Vector4) => Vector4 = internal.normalize\n\nexport const dot: {\n /**\n * Computes the dot product of two `Vector4` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns The dot product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector4, b: Vector4): number\n /**\n * Computes the dot product of a `Vector4` instance and another vector.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the dot product.\n * @since 1.0.0\n */\n (b: Vector4): (a: Vector4) => number\n} = internal.dot\n\n/**\n * Returns the components of a `Vector4` as an array.\n *\n * @param v - The vector to get the components of.\n * @returns An array containing the x, y, z, and w components of the vector.\n * @since 1.0.0\n */\nexport const components: (v: Vector4) => [number, number, number, number] = internal.components\n\n/**\n * Applies the softmax function to a `Vector4`.\n *\n * @param v - The vector to calculate the softmax of.\n * @returns A new `Vector4` instance representing the softmax of the input vector.\n */\nexport const softmax: (v: Vector4) => Vector4 = internal.softmax\n\n/**\n * Creates a zero vector.\n *\n * @since 1.0.0\n */\nexport const zero = make(0)\n\n/**\n * Creates a unit vector.\n *\n * @since 1.0.0\n */\nexport const unit = make(1)\n\nexport const add: {\n /**\n * Adds two `Vector4` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector4` instance representing the sum of the two vectors.\n * @since 1.0.0\n */\n (a: Vector4, b: Vector4): Vector4\n\n /**\n * Adds a `Vector4` instance to another vector.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the sum.\n * @since 1.0.0\n */\n (b: Vector4): (a: Vector4) => Vector4\n} = internal.add\n\nexport const subtract: {\n /**\n * Subtracts one `Vector4` instance from another.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector4` instance representing the difference of the two vectors.\n * @since 1.0.0\n */\n (a: Vector4, b: Vector4): Vector4\n /**\n * Subtracts a `Vector4` instance from another vector.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the difference.\n * @since 1.0.0\n */\n (b: Vector4): (a: Vector4) => Vector4\n} = internal.subtract\n\nexport const hadamard: {\n /**\n * Computes the Hadamard product of two `Vector4` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector4` instance representing the Hadamard product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector4, b: Vector4): Vector4\n /**\n * Computes the Hadamard product of a `Vector4` instance and another vector.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the Hadamard product.\n * @since 1.0.0\n */\n (b: Vector4): (a: Vector4) => Vector4\n} = internal.hadamard\n\nexport const scale: {\n /**\n * Scales a `Vector4` by a scalar.\n *\n * @param s - The scalar to scale the vector by.\n * @returns A function that takes the vector and returns the scaled vector.\n * @since 1.0.0\n */\n (s: number): (v: Vector4) => Vector4\n /**\n * Scales a `Vector4` by a scalar.\n *\n * @param s - The scalar to scale the vector by.\n * @param v - The vector to scale.\n * @returns A new `Vector4` instance representing the scaled vector.\n * @since 1.0.0\n */\n (v: Vector4, s: number): Vector4\n} = internal.scale\n"],"names":["internal.isVector4","internal.make","internal.magnitude","internal.normalize","internal.dot","internal.components","internal.softmax","internal.add","internal.subtract","internal.hadamard","internal.scale"],"mappings":";;;;AAuBO,MAAM,YAA0CA;AAEhD,MAAM,OAuCTC;AASG,MAAM,YAAyCC;AAS/C,MAAM,YAA0CC;AAEhD,MAAM,MAkBTC;AASG,MAAM,aAA+DC;AAQrE,MAAM,UAAmCC;AAOnC,MAAA,IAAA,GAAO,KAAK,CAAC;AAOb,MAAA,IAAA,GAAO,KAAK,CAAC;AAEnB,MAAM,MAmBTC;AAEG,MAAM,WAkBTC;AAEG,MAAM,WAkBTC;AAEG,MAAM,QAkBTC;;;;"}
|