curvy 1.0.8 → 1.0.9
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/curve/cubic2d.d.mts +80 -2
- package/dist/curve/cubic2d.d.ts +80 -2
- package/dist/curve/cubic2d.mjs +9 -26
- package/dist/curve/cubic2d.mjs.map +1 -0
- package/dist/curve/linear2d.d.mts +68 -2
- package/dist/curve/linear2d.d.ts +68 -2
- package/dist/curve/linear2d.mjs +11 -14
- package/dist/curve/linear2d.mjs.map +1 -0
- package/dist/curve/quadratic2d.d.mts +86 -2
- package/dist/curve/quadratic2d.d.ts +86 -2
- package/dist/curve/quadratic2d.mjs +10 -15
- package/dist/curve/quadratic2d.mjs.map +1 -0
- package/dist/interval.d.mts +195 -2
- package/dist/interval.d.ts +195 -2
- package/dist/interval.mjs +9 -12
- package/dist/interval.mjs.map +1 -0
- package/dist/matrix/matrix2x2.d.mts +273 -2
- package/dist/matrix/matrix2x2.d.ts +273 -2
- package/dist/matrix/matrix2x2.mjs +5 -4
- package/dist/matrix/matrix2x2.mjs.map +1 -0
- package/dist/matrix/matrix3x3.d.mts +308 -1
- package/dist/matrix/matrix3x3.d.ts +308 -1
- package/dist/matrix/matrix3x3.mjs +5 -4
- package/dist/matrix/matrix3x3.mjs.map +1 -0
- package/dist/matrix/matrix4x4.d.mts +310 -1
- package/dist/matrix/matrix4x4.d.ts +310 -1
- package/dist/matrix/matrix4x4.mjs +24 -61
- package/dist/matrix/matrix4x4.mjs.map +1 -0
- package/dist/path/cubic2d.d.mts +68 -2
- package/dist/path/cubic2d.d.ts +68 -2
- package/dist/path/cubic2d.mjs +10 -12
- package/dist/path/cubic2d.mjs.map +1 -0
- package/dist/path/linear2d.d.mts +68 -2
- package/dist/path/linear2d.d.ts +68 -2
- package/dist/path/linear2d.mjs +7 -9
- package/dist/path/linear2d.mjs.map +1 -0
- package/dist/path/quadratic2d.d.mts +67 -2
- package/dist/path/quadratic2d.d.ts +67 -2
- package/dist/path/quadratic2d.mjs +9 -13
- package/dist/path/quadratic2d.mjs.map +1 -0
- package/dist/pipe.mjs +1 -0
- package/dist/pipe.mjs.map +1 -0
- package/dist/polynomial/cubic.d.mts +1 -1
- package/dist/polynomial/cubic.d.ts +1 -1
- package/dist/polynomial/cubic.mjs +13 -28
- package/dist/polynomial/cubic.mjs.map +1 -0
- package/dist/polynomial/linear.d.mts +1 -1
- package/dist/polynomial/linear.d.ts +1 -1
- package/dist/polynomial/linear.mjs +2 -1
- package/dist/polynomial/linear.mjs.map +1 -0
- package/dist/polynomial/quadratic.d.mts +2 -2
- package/dist/polynomial/quadratic.d.ts +2 -2
- package/dist/polynomial/quadratic.mjs +5 -2
- package/dist/polynomial/quadratic.mjs.map +1 -0
- package/dist/shared/{curvy.Cps2R_RU.mjs → curvy.BkkW8Tx9.mjs} +11 -29
- package/dist/shared/curvy.BkkW8Tx9.mjs.map +1 -0
- package/dist/shared/{curvy.BzVmUIKm.mjs → curvy.BxdGW9he.mjs} +17 -32
- package/dist/shared/curvy.BxdGW9he.mjs.map +1 -0
- package/dist/shared/{curvy.C2XGH0R0.mjs → curvy.C_sCeg9J.mjs} +15 -24
- package/dist/shared/curvy.C_sCeg9J.mjs.map +1 -0
- package/dist/shared/curvy.Cg8lZVUz.d.ts +688 -0
- package/dist/shared/{curvy.CE4X6_Is.mjs → curvy.DCt1gGII.mjs} +11 -45
- package/dist/shared/curvy.DCt1gGII.mjs.map +1 -0
- package/dist/shared/{curvy.BZ_mTkJe.mjs → curvy.DJ4xO0al.mjs} +9 -6
- package/dist/shared/curvy.DJ4xO0al.mjs.map +1 -0
- package/dist/shared/curvy.DmVFTi0N.mjs +1 -0
- package/dist/shared/curvy.DmVFTi0N.mjs.map +1 -0
- package/dist/shared/curvy.FDaj5rlj.d.mts +688 -0
- package/dist/shared/{curvy.Cv-wIzDr.mjs → curvy.lktriTpx.mjs} +19 -42
- package/dist/shared/curvy.lktriTpx.mjs.map +1 -0
- package/dist/shared/{curvy.wYJQhFW-.mjs → curvy.mLFprrGm.mjs} +14 -16
- package/dist/shared/curvy.mLFprrGm.mjs.map +1 -0
- package/dist/shared/{curvy.BDhiZ7He.mjs → curvy.r6f1j287.mjs} +8 -12
- package/dist/shared/curvy.r6f1j287.mjs.map +1 -0
- package/dist/splines/basis2d.d.mts +94 -2
- package/dist/splines/basis2d.d.ts +94 -2
- package/dist/splines/basis2d.mjs +13 -12
- package/dist/splines/basis2d.mjs.map +1 -0
- package/dist/splines/bezier2d.d.mts +136 -2
- package/dist/splines/bezier2d.d.ts +136 -2
- package/dist/splines/bezier2d.mjs +10 -9
- package/dist/splines/bezier2d.mjs.map +1 -0
- package/dist/splines/cardinal2d.d.mts +131 -2
- package/dist/splines/cardinal2d.d.ts +131 -2
- package/dist/splines/cardinal2d.mjs +15 -24
- package/dist/splines/cardinal2d.mjs.map +1 -0
- package/dist/splines/hermite2d.d.mts +94 -3
- package/dist/splines/hermite2d.d.ts +94 -3
- package/dist/splines/hermite2d.mjs +22 -36
- package/dist/splines/hermite2d.mjs.map +1 -0
- package/dist/utils.d.mts +179 -1
- package/dist/utils.d.ts +179 -1
- package/dist/utils.mjs +16 -7
- package/dist/utils.mjs.map +1 -0
- package/dist/vector/vector2.d.mts +259 -1
- package/dist/vector/vector2.d.ts +259 -1
- package/dist/vector/vector2.mjs +4 -2
- package/dist/vector/vector2.mjs.map +1 -0
- package/dist/vector/vector3.d.mts +341 -1
- package/dist/vector/vector3.d.ts +341 -1
- package/dist/vector/vector3.mjs +8 -2
- package/dist/vector/vector3.mjs.map +1 -0
- package/dist/vector/vector4.d.mts +163 -1
- package/dist/vector/vector4.d.ts +163 -1
- package/dist/vector/vector4.mjs +4 -2
- package/dist/vector/vector4.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/shared/curvy.BsHoYJNv.d.ts +0 -155
- package/dist/shared/curvy.NsmY7zcr.d.mts +0 -155
package/dist/vector/vector4.d.ts
CHANGED
|
@@ -4,40 +4,202 @@ import { Pipeable } from '../pipe.js';
|
|
|
4
4
|
declare const Vector4TypeId: unique symbol;
|
|
5
5
|
type Vector4TypeId = typeof Vector4TypeId;
|
|
6
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
|
+
*/
|
|
7
14
|
interface Vector4 extends Pipeable, FourDimensional<number> {
|
|
8
15
|
readonly [Vector4TypeId]: Vector4TypeId;
|
|
9
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
|
+
*/
|
|
10
24
|
declare const isVector4: (v: unknown) => v is Vector4;
|
|
11
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
|
+
*/
|
|
12
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
|
+
*/
|
|
13
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
|
+
*/
|
|
14
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
|
+
*/
|
|
15
63
|
(x: number, y: number, z: number, w: number): Vector4;
|
|
16
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
|
+
*/
|
|
17
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
|
+
*/
|
|
18
80
|
declare const normalize: (vector: Vector4) => Vector4;
|
|
19
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
|
+
*/
|
|
20
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
|
+
*/
|
|
21
98
|
(b: Vector4): (a: Vector4) => number;
|
|
22
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
|
+
*/
|
|
23
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
|
+
*/
|
|
24
114
|
declare const softmax: (v: Vector4) => Vector4;
|
|
115
|
+
/**
|
|
116
|
+
* Creates a zero vector.
|
|
117
|
+
*
|
|
118
|
+
* @since 1.0.0
|
|
119
|
+
*/
|
|
25
120
|
declare const zero: Vector4;
|
|
121
|
+
/**
|
|
122
|
+
* Creates a unit vector.
|
|
123
|
+
*
|
|
124
|
+
* @since 1.0.0
|
|
125
|
+
*/
|
|
126
|
+
declare const unit: Vector4;
|
|
26
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
|
+
*/
|
|
27
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
|
+
*/
|
|
28
144
|
(b: Vector4): (a: Vector4) => Vector4;
|
|
29
145
|
};
|
|
30
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
|
+
*/
|
|
31
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
|
+
*/
|
|
32
163
|
(b: Vector4): (a: Vector4) => Vector4;
|
|
33
164
|
};
|
|
34
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
|
+
*/
|
|
35
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
|
+
*/
|
|
36
182
|
(b: Vector4): (a: Vector4) => Vector4;
|
|
37
183
|
};
|
|
38
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
|
+
*/
|
|
39
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
|
+
*/
|
|
40
201
|
(v: Vector4, s: number): Vector4;
|
|
41
202
|
};
|
|
42
203
|
|
|
43
|
-
export {
|
|
204
|
+
export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, unit, zero };
|
|
205
|
+
export type { Vector4 };
|
package/dist/vector/vector4.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
2
|
import '../pipe.mjs';
|
|
3
3
|
import '../utils.mjs';
|
|
4
4
|
|
|
@@ -10,9 +10,11 @@ const dot = dot$1;
|
|
|
10
10
|
const components = components$1;
|
|
11
11
|
const softmax = softmax$1;
|
|
12
12
|
const zero = make(0);
|
|
13
|
+
const unit = make(1);
|
|
13
14
|
const add = add$1;
|
|
14
15
|
const subtract = subtract$1;
|
|
15
16
|
const hadamard = hadamard$1;
|
|
16
17
|
const scale = scale$1;
|
|
17
18
|
|
|
18
|
-
export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, zero };
|
|
19
|
+
export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, unit, zero };
|
|
20
|
+
//# sourceMappingURL=vector4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "curvy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Spline and Curve utilities",
|
|
5
5
|
"author": "Tim Morris <timthewebguy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/tkofh/curvy#readme",
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
"url": "https://github.com/tkofh/curvy/issues"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"typescript": "^5.
|
|
115
|
-
"unbuild": "3.
|
|
116
|
-
"vitest": "^
|
|
114
|
+
"typescript": "^5.8.3",
|
|
115
|
+
"unbuild": "3.5.0",
|
|
116
|
+
"vitest": "^3.1.1",
|
|
117
117
|
"@repo/tsconfig": "1.0.0"
|
|
118
118
|
},
|
|
119
119
|
"scripts": {
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Interval } from '../interval.js';
|
|
2
|
-
import { Pipeable } from '../pipe.js';
|
|
3
|
-
import { Vector2 } from '../vector/vector2.js';
|
|
4
|
-
import { Vector3 } from '../vector/vector3.js';
|
|
5
|
-
import { Vector4 } from '../vector/vector4.js';
|
|
6
|
-
|
|
7
|
-
declare const CubicPolynomialTypeId: unique symbol;
|
|
8
|
-
type CubicPolynomialTypeId = typeof CubicPolynomialTypeId;
|
|
9
|
-
|
|
10
|
-
type Monotonicity = 'none' | 'increasing' | 'decreasing' | 'constant';
|
|
11
|
-
type GuaranteedMonotonicity = 'increasing' | 'decreasing' | 'constant';
|
|
12
|
-
|
|
13
|
-
type ZeroOrOneSolution = number | null;
|
|
14
|
-
type ZeroOrOneInterval = Interval | null;
|
|
15
|
-
type ZeroToTwoSolutions = readonly [] | readonly [number] | readonly [number, number];
|
|
16
|
-
type ZeroToThreeSolutions = readonly [] | readonly [number] | readonly [number, number] | readonly [number, number, number];
|
|
17
|
-
|
|
18
|
-
interface CubicPolynomial extends Pipeable {
|
|
19
|
-
readonly [CubicPolynomialTypeId]: CubicPolynomialTypeId;
|
|
20
|
-
readonly c0: number;
|
|
21
|
-
readonly c1: number;
|
|
22
|
-
readonly c2: number;
|
|
23
|
-
readonly c3: number;
|
|
24
|
-
}
|
|
25
|
-
declare const isCubicPolynomial: (value: unknown) => value is CubicPolynomial;
|
|
26
|
-
declare const make$2: (c0: number, c1: number, c2: number, c3: number) => CubicPolynomial;
|
|
27
|
-
declare const fromVector$2: (v: Vector4) => CubicPolynomial;
|
|
28
|
-
declare const solve$2: {
|
|
29
|
-
(p: CubicPolynomial, x: number): number;
|
|
30
|
-
(x: number): (p: CubicPolynomial) => number;
|
|
31
|
-
};
|
|
32
|
-
declare const toSolver$2: (p: CubicPolynomial) => (x: number) => number;
|
|
33
|
-
declare const solveInverse$2: {
|
|
34
|
-
(p: CubicPolynomial, y: number): ZeroToThreeSolutions;
|
|
35
|
-
(y: number): (p: CubicPolynomial) => ZeroToThreeSolutions;
|
|
36
|
-
};
|
|
37
|
-
declare const toInverseSolver$2: (p: CubicPolynomial) => (y: number) => ZeroToThreeSolutions;
|
|
38
|
-
declare const derivative$2: (p: CubicPolynomial) => QuadraticPolynomial;
|
|
39
|
-
declare const roots$1: (p: CubicPolynomial) => ZeroToThreeSolutions;
|
|
40
|
-
declare const extrema: (p: CubicPolynomial) => ZeroToTwoSolutions;
|
|
41
|
-
declare const monotonicity$2: {
|
|
42
|
-
(p: CubicPolynomial, i?: Interval): Monotonicity;
|
|
43
|
-
(i: Interval): (p: CubicPolynomial) => Monotonicity;
|
|
44
|
-
};
|
|
45
|
-
declare const domain$2: {
|
|
46
|
-
(p: CubicPolynomial, range: Interval): Interval;
|
|
47
|
-
(range: Interval): (p: CubicPolynomial) => Interval;
|
|
48
|
-
};
|
|
49
|
-
declare const range$2: {
|
|
50
|
-
(p: CubicPolynomial, domain: Interval): Interval;
|
|
51
|
-
(domain: Interval): (p: CubicPolynomial) => Interval;
|
|
52
|
-
};
|
|
53
|
-
declare const length$2: {
|
|
54
|
-
(p: CubicPolynomial, domain: Interval): number;
|
|
55
|
-
(domain: Interval): (p: CubicPolynomial) => number;
|
|
56
|
-
};
|
|
57
|
-
declare const curvature$1: {
|
|
58
|
-
(p: CubicPolynomial, x: number): number;
|
|
59
|
-
(x: number): (p: CubicPolynomial) => number;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare const QuadraticPolynomialTypeId: unique symbol;
|
|
63
|
-
type QuadraticPolynomialTypeId = typeof QuadraticPolynomialTypeId;
|
|
64
|
-
|
|
65
|
-
interface QuadraticPolynomial extends Pipeable {
|
|
66
|
-
readonly [QuadraticPolynomialTypeId]: QuadraticPolynomialTypeId;
|
|
67
|
-
readonly c0: number;
|
|
68
|
-
readonly c1: number;
|
|
69
|
-
readonly c2: number;
|
|
70
|
-
}
|
|
71
|
-
declare const isQuadraticPolynomial: (v: unknown) => v is QuadraticPolynomial;
|
|
72
|
-
declare const make$1: (c0?: number, c1?: number, c2?: number) => QuadraticPolynomial;
|
|
73
|
-
declare const fromVector$1: (v: Vector3) => QuadraticPolynomial;
|
|
74
|
-
declare const solve$1: {
|
|
75
|
-
(p: QuadraticPolynomial, x: number): number;
|
|
76
|
-
(x: number): (p: QuadraticPolynomial) => number;
|
|
77
|
-
};
|
|
78
|
-
declare const toSolver$1: (p: QuadraticPolynomial) => (x: number) => number;
|
|
79
|
-
declare const solveInverse$1: {
|
|
80
|
-
(p: QuadraticPolynomial, y: number): ZeroToTwoSolutions;
|
|
81
|
-
(y: number): (p: QuadraticPolynomial) => ZeroToTwoSolutions;
|
|
82
|
-
};
|
|
83
|
-
declare const toInverseSolver$1: (p: QuadraticPolynomial) => (y: number) => ZeroToTwoSolutions;
|
|
84
|
-
declare const derivative$1: (p: QuadraticPolynomial) => LinearPolynomial;
|
|
85
|
-
declare const roots: (p: QuadraticPolynomial) => ZeroToTwoSolutions;
|
|
86
|
-
declare const extreme: (p: QuadraticPolynomial) => ZeroOrOneSolution;
|
|
87
|
-
declare const monotonicity$1: {
|
|
88
|
-
(p: QuadraticPolynomial, i?: Interval): Monotonicity;
|
|
89
|
-
(i: Interval): (p: QuadraticPolynomial) => Monotonicity;
|
|
90
|
-
};
|
|
91
|
-
declare const antiderivative$1: {
|
|
92
|
-
(p: QuadraticPolynomial, constant?: number): CubicPolynomial;
|
|
93
|
-
(constant: number): (p: QuadraticPolynomial) => CubicPolynomial;
|
|
94
|
-
};
|
|
95
|
-
declare const domain$1: {
|
|
96
|
-
(p: QuadraticPolynomial, range: Interval): Interval | null;
|
|
97
|
-
(range: Interval): (p: QuadraticPolynomial) => Interval | null;
|
|
98
|
-
};
|
|
99
|
-
declare const range$1: {
|
|
100
|
-
(p: QuadraticPolynomial, domain: Interval): Interval;
|
|
101
|
-
(domain: Interval): (p: QuadraticPolynomial) => Interval;
|
|
102
|
-
};
|
|
103
|
-
declare const length$1: {
|
|
104
|
-
(p: QuadraticPolynomial, i: Interval): number;
|
|
105
|
-
(i: Interval): (p: QuadraticPolynomial) => number;
|
|
106
|
-
};
|
|
107
|
-
declare const curvature: {
|
|
108
|
-
(p: QuadraticPolynomial, x: number): number;
|
|
109
|
-
(x: number): (p: QuadraticPolynomial) => number;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
declare const LinearPolynomialTypeId: unique symbol;
|
|
113
|
-
type LinearPolynomialTypeId = typeof LinearPolynomialTypeId;
|
|
114
|
-
|
|
115
|
-
interface LinearPolynomial extends Pipeable {
|
|
116
|
-
readonly [LinearPolynomialTypeId]: LinearPolynomialTypeId;
|
|
117
|
-
readonly c0: number;
|
|
118
|
-
readonly c1: number;
|
|
119
|
-
}
|
|
120
|
-
declare const isLinearPolynomial: (v: unknown) => v is LinearPolynomial;
|
|
121
|
-
declare const make: (c0?: number, c1?: number) => LinearPolynomial;
|
|
122
|
-
declare const fromVector: (v: Vector2) => LinearPolynomial;
|
|
123
|
-
declare const fromPointSlope: (p: Vector2, slope: number) => LinearPolynomial;
|
|
124
|
-
declare const fromPoints: (p1: Vector2, p2: Vector2) => LinearPolynomial;
|
|
125
|
-
declare const solve: {
|
|
126
|
-
(p: LinearPolynomial, x: number): number;
|
|
127
|
-
(x: number): (p: LinearPolynomial) => number;
|
|
128
|
-
};
|
|
129
|
-
declare const toSolver: (p: LinearPolynomial) => (x: number) => number;
|
|
130
|
-
declare const solveInverse: {
|
|
131
|
-
(p: LinearPolynomial, y: number): ZeroOrOneSolution;
|
|
132
|
-
(y: number): (p: LinearPolynomial) => ZeroOrOneSolution;
|
|
133
|
-
};
|
|
134
|
-
declare const toInverseSolver: (p: LinearPolynomial) => (y: number) => ZeroOrOneSolution;
|
|
135
|
-
declare const root: (p: LinearPolynomial) => ZeroOrOneSolution;
|
|
136
|
-
declare const monotonicity: (p: LinearPolynomial) => GuaranteedMonotonicity;
|
|
137
|
-
declare const derivative: (p: LinearPolynomial) => number;
|
|
138
|
-
declare const antiderivative: {
|
|
139
|
-
(p: LinearPolynomial, constant?: number): QuadraticPolynomial;
|
|
140
|
-
(constant: number): (p: LinearPolynomial) => QuadraticPolynomial;
|
|
141
|
-
};
|
|
142
|
-
declare const domain: {
|
|
143
|
-
(p: LinearPolynomial, range: Interval): ZeroOrOneInterval;
|
|
144
|
-
(range: Interval): (p: LinearPolynomial) => ZeroOrOneInterval;
|
|
145
|
-
};
|
|
146
|
-
declare const range: {
|
|
147
|
-
(p: LinearPolynomial, domain: Interval): Interval;
|
|
148
|
-
(domain: Interval): (p: LinearPolynomial) => Interval;
|
|
149
|
-
};
|
|
150
|
-
declare const length: {
|
|
151
|
-
(p: LinearPolynomial, domain: Interval): number;
|
|
152
|
-
(domain: Interval): (p: LinearPolynomial) => number;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export { antiderivative$1 as A, domain$1 as B, type CubicPolynomial as C, range$1 as D, length$1 as E, curvature as F, isLinearPolynomial as G, make as H, fromVector as I, fromPointSlope as J, fromPoints as K, type LinearPolynomial as L, solve as M, toSolver as N, solveInverse as O, toInverseSolver as P, type QuadraticPolynomial as Q, root as R, monotonicity as S, derivative as T, antiderivative as U, domain as V, range as W, length as X, solveInverse$2 as a, toInverseSolver$2 as b, monotonicity$2 as c, derivative$2 as d, extrema as e, fromVector$2 as f, domain$2 as g, range$2 as h, isCubicPolynomial as i, curvature$1 as j, isQuadraticPolynomial as k, length$2 as l, make$2 as m, make$1 as n, fromVector$1 as o, solve$1 as p, toSolver$1 as q, roots$1 as r, solve$2 as s, toSolver$2 as t, solveInverse$1 as u, toInverseSolver$1 as v, derivative$1 as w, roots as x, extreme as y, monotonicity$1 as z };
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Interval } from '../interval.mjs';
|
|
2
|
-
import { Pipeable } from '../pipe.mjs';
|
|
3
|
-
import { Vector2 } from '../vector/vector2.mjs';
|
|
4
|
-
import { Vector3 } from '../vector/vector3.mjs';
|
|
5
|
-
import { Vector4 } from '../vector/vector4.mjs';
|
|
6
|
-
|
|
7
|
-
declare const CubicPolynomialTypeId: unique symbol;
|
|
8
|
-
type CubicPolynomialTypeId = typeof CubicPolynomialTypeId;
|
|
9
|
-
|
|
10
|
-
type Monotonicity = 'none' | 'increasing' | 'decreasing' | 'constant';
|
|
11
|
-
type GuaranteedMonotonicity = 'increasing' | 'decreasing' | 'constant';
|
|
12
|
-
|
|
13
|
-
type ZeroOrOneSolution = number | null;
|
|
14
|
-
type ZeroOrOneInterval = Interval | null;
|
|
15
|
-
type ZeroToTwoSolutions = readonly [] | readonly [number] | readonly [number, number];
|
|
16
|
-
type ZeroToThreeSolutions = readonly [] | readonly [number] | readonly [number, number] | readonly [number, number, number];
|
|
17
|
-
|
|
18
|
-
interface CubicPolynomial extends Pipeable {
|
|
19
|
-
readonly [CubicPolynomialTypeId]: CubicPolynomialTypeId;
|
|
20
|
-
readonly c0: number;
|
|
21
|
-
readonly c1: number;
|
|
22
|
-
readonly c2: number;
|
|
23
|
-
readonly c3: number;
|
|
24
|
-
}
|
|
25
|
-
declare const isCubicPolynomial: (value: unknown) => value is CubicPolynomial;
|
|
26
|
-
declare const make$2: (c0: number, c1: number, c2: number, c3: number) => CubicPolynomial;
|
|
27
|
-
declare const fromVector$2: (v: Vector4) => CubicPolynomial;
|
|
28
|
-
declare const solve$2: {
|
|
29
|
-
(p: CubicPolynomial, x: number): number;
|
|
30
|
-
(x: number): (p: CubicPolynomial) => number;
|
|
31
|
-
};
|
|
32
|
-
declare const toSolver$2: (p: CubicPolynomial) => (x: number) => number;
|
|
33
|
-
declare const solveInverse$2: {
|
|
34
|
-
(p: CubicPolynomial, y: number): ZeroToThreeSolutions;
|
|
35
|
-
(y: number): (p: CubicPolynomial) => ZeroToThreeSolutions;
|
|
36
|
-
};
|
|
37
|
-
declare const toInverseSolver$2: (p: CubicPolynomial) => (y: number) => ZeroToThreeSolutions;
|
|
38
|
-
declare const derivative$2: (p: CubicPolynomial) => QuadraticPolynomial;
|
|
39
|
-
declare const roots$1: (p: CubicPolynomial) => ZeroToThreeSolutions;
|
|
40
|
-
declare const extrema: (p: CubicPolynomial) => ZeroToTwoSolutions;
|
|
41
|
-
declare const monotonicity$2: {
|
|
42
|
-
(p: CubicPolynomial, i?: Interval): Monotonicity;
|
|
43
|
-
(i: Interval): (p: CubicPolynomial) => Monotonicity;
|
|
44
|
-
};
|
|
45
|
-
declare const domain$2: {
|
|
46
|
-
(p: CubicPolynomial, range: Interval): Interval;
|
|
47
|
-
(range: Interval): (p: CubicPolynomial) => Interval;
|
|
48
|
-
};
|
|
49
|
-
declare const range$2: {
|
|
50
|
-
(p: CubicPolynomial, domain: Interval): Interval;
|
|
51
|
-
(domain: Interval): (p: CubicPolynomial) => Interval;
|
|
52
|
-
};
|
|
53
|
-
declare const length$2: {
|
|
54
|
-
(p: CubicPolynomial, domain: Interval): number;
|
|
55
|
-
(domain: Interval): (p: CubicPolynomial) => number;
|
|
56
|
-
};
|
|
57
|
-
declare const curvature$1: {
|
|
58
|
-
(p: CubicPolynomial, x: number): number;
|
|
59
|
-
(x: number): (p: CubicPolynomial) => number;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare const QuadraticPolynomialTypeId: unique symbol;
|
|
63
|
-
type QuadraticPolynomialTypeId = typeof QuadraticPolynomialTypeId;
|
|
64
|
-
|
|
65
|
-
interface QuadraticPolynomial extends Pipeable {
|
|
66
|
-
readonly [QuadraticPolynomialTypeId]: QuadraticPolynomialTypeId;
|
|
67
|
-
readonly c0: number;
|
|
68
|
-
readonly c1: number;
|
|
69
|
-
readonly c2: number;
|
|
70
|
-
}
|
|
71
|
-
declare const isQuadraticPolynomial: (v: unknown) => v is QuadraticPolynomial;
|
|
72
|
-
declare const make$1: (c0?: number, c1?: number, c2?: number) => QuadraticPolynomial;
|
|
73
|
-
declare const fromVector$1: (v: Vector3) => QuadraticPolynomial;
|
|
74
|
-
declare const solve$1: {
|
|
75
|
-
(p: QuadraticPolynomial, x: number): number;
|
|
76
|
-
(x: number): (p: QuadraticPolynomial) => number;
|
|
77
|
-
};
|
|
78
|
-
declare const toSolver$1: (p: QuadraticPolynomial) => (x: number) => number;
|
|
79
|
-
declare const solveInverse$1: {
|
|
80
|
-
(p: QuadraticPolynomial, y: number): ZeroToTwoSolutions;
|
|
81
|
-
(y: number): (p: QuadraticPolynomial) => ZeroToTwoSolutions;
|
|
82
|
-
};
|
|
83
|
-
declare const toInverseSolver$1: (p: QuadraticPolynomial) => (y: number) => ZeroToTwoSolutions;
|
|
84
|
-
declare const derivative$1: (p: QuadraticPolynomial) => LinearPolynomial;
|
|
85
|
-
declare const roots: (p: QuadraticPolynomial) => ZeroToTwoSolutions;
|
|
86
|
-
declare const extreme: (p: QuadraticPolynomial) => ZeroOrOneSolution;
|
|
87
|
-
declare const monotonicity$1: {
|
|
88
|
-
(p: QuadraticPolynomial, i?: Interval): Monotonicity;
|
|
89
|
-
(i: Interval): (p: QuadraticPolynomial) => Monotonicity;
|
|
90
|
-
};
|
|
91
|
-
declare const antiderivative$1: {
|
|
92
|
-
(p: QuadraticPolynomial, constant?: number): CubicPolynomial;
|
|
93
|
-
(constant: number): (p: QuadraticPolynomial) => CubicPolynomial;
|
|
94
|
-
};
|
|
95
|
-
declare const domain$1: {
|
|
96
|
-
(p: QuadraticPolynomial, range: Interval): Interval | null;
|
|
97
|
-
(range: Interval): (p: QuadraticPolynomial) => Interval | null;
|
|
98
|
-
};
|
|
99
|
-
declare const range$1: {
|
|
100
|
-
(p: QuadraticPolynomial, domain: Interval): Interval;
|
|
101
|
-
(domain: Interval): (p: QuadraticPolynomial) => Interval;
|
|
102
|
-
};
|
|
103
|
-
declare const length$1: {
|
|
104
|
-
(p: QuadraticPolynomial, i: Interval): number;
|
|
105
|
-
(i: Interval): (p: QuadraticPolynomial) => number;
|
|
106
|
-
};
|
|
107
|
-
declare const curvature: {
|
|
108
|
-
(p: QuadraticPolynomial, x: number): number;
|
|
109
|
-
(x: number): (p: QuadraticPolynomial) => number;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
declare const LinearPolynomialTypeId: unique symbol;
|
|
113
|
-
type LinearPolynomialTypeId = typeof LinearPolynomialTypeId;
|
|
114
|
-
|
|
115
|
-
interface LinearPolynomial extends Pipeable {
|
|
116
|
-
readonly [LinearPolynomialTypeId]: LinearPolynomialTypeId;
|
|
117
|
-
readonly c0: number;
|
|
118
|
-
readonly c1: number;
|
|
119
|
-
}
|
|
120
|
-
declare const isLinearPolynomial: (v: unknown) => v is LinearPolynomial;
|
|
121
|
-
declare const make: (c0?: number, c1?: number) => LinearPolynomial;
|
|
122
|
-
declare const fromVector: (v: Vector2) => LinearPolynomial;
|
|
123
|
-
declare const fromPointSlope: (p: Vector2, slope: number) => LinearPolynomial;
|
|
124
|
-
declare const fromPoints: (p1: Vector2, p2: Vector2) => LinearPolynomial;
|
|
125
|
-
declare const solve: {
|
|
126
|
-
(p: LinearPolynomial, x: number): number;
|
|
127
|
-
(x: number): (p: LinearPolynomial) => number;
|
|
128
|
-
};
|
|
129
|
-
declare const toSolver: (p: LinearPolynomial) => (x: number) => number;
|
|
130
|
-
declare const solveInverse: {
|
|
131
|
-
(p: LinearPolynomial, y: number): ZeroOrOneSolution;
|
|
132
|
-
(y: number): (p: LinearPolynomial) => ZeroOrOneSolution;
|
|
133
|
-
};
|
|
134
|
-
declare const toInverseSolver: (p: LinearPolynomial) => (y: number) => ZeroOrOneSolution;
|
|
135
|
-
declare const root: (p: LinearPolynomial) => ZeroOrOneSolution;
|
|
136
|
-
declare const monotonicity: (p: LinearPolynomial) => GuaranteedMonotonicity;
|
|
137
|
-
declare const derivative: (p: LinearPolynomial) => number;
|
|
138
|
-
declare const antiderivative: {
|
|
139
|
-
(p: LinearPolynomial, constant?: number): QuadraticPolynomial;
|
|
140
|
-
(constant: number): (p: LinearPolynomial) => QuadraticPolynomial;
|
|
141
|
-
};
|
|
142
|
-
declare const domain: {
|
|
143
|
-
(p: LinearPolynomial, range: Interval): ZeroOrOneInterval;
|
|
144
|
-
(range: Interval): (p: LinearPolynomial) => ZeroOrOneInterval;
|
|
145
|
-
};
|
|
146
|
-
declare const range: {
|
|
147
|
-
(p: LinearPolynomial, domain: Interval): Interval;
|
|
148
|
-
(domain: Interval): (p: LinearPolynomial) => Interval;
|
|
149
|
-
};
|
|
150
|
-
declare const length: {
|
|
151
|
-
(p: LinearPolynomial, domain: Interval): number;
|
|
152
|
-
(domain: Interval): (p: LinearPolynomial) => number;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export { antiderivative$1 as A, domain$1 as B, type CubicPolynomial as C, range$1 as D, length$1 as E, curvature as F, isLinearPolynomial as G, make as H, fromVector as I, fromPointSlope as J, fromPoints as K, type LinearPolynomial as L, solve as M, toSolver as N, solveInverse as O, toInverseSolver as P, type QuadraticPolynomial as Q, root as R, monotonicity as S, derivative as T, antiderivative as U, domain as V, range as W, length as X, solveInverse$2 as a, toInverseSolver$2 as b, monotonicity$2 as c, derivative$2 as d, extrema as e, fromVector$2 as f, domain$2 as g, range$2 as h, isCubicPolynomial as i, curvature$1 as j, isQuadraticPolynomial as k, length$2 as l, make$2 as m, make$1 as n, fromVector$1 as o, solve$1 as p, toSolver$1 as q, roots$1 as r, solve$2 as s, toSolver$2 as t, solveInverse$1 as u, toInverseSolver$1 as v, derivative$1 as w, roots as x, extreme as y, monotonicity$1 as z };
|