@pawells/math-extended 1.1.1 → 2.0.0
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/build/angles.d.ts +28 -18
- package/build/angles.d.ts.map +1 -1
- package/build/angles.js +28 -18
- package/build/angles.js.map +1 -1
- package/build/clamp.d.ts +5 -3
- package/build/clamp.d.ts.map +1 -1
- package/build/clamp.js +5 -3
- package/build/clamp.js.map +1 -1
- package/build/interpolation.d.ts +158 -96
- package/build/interpolation.d.ts.map +1 -1
- package/build/interpolation.js +158 -96
- package/build/interpolation.js.map +1 -1
- package/build/matrices/_exports.d.ts +13 -0
- package/build/matrices/_exports.d.ts.map +1 -0
- package/build/matrices/_exports.js +13 -0
- package/build/matrices/_exports.js.map +1 -0
- package/build/matrices/arithmetic.d.ts +170 -181
- package/build/matrices/arithmetic.d.ts.map +1 -1
- package/build/matrices/arithmetic.js +192 -202
- package/build/matrices/arithmetic.js.map +1 -1
- package/build/matrices/asserts.d.ts +240 -109
- package/build/matrices/asserts.d.ts.map +1 -1
- package/build/matrices/asserts.js +287 -87
- package/build/matrices/asserts.js.map +1 -1
- package/build/matrices/core.d.ts +29 -29
- package/build/matrices/core.js +1 -1
- package/build/matrices/decompositions.d.ts +102 -104
- package/build/matrices/decompositions.d.ts.map +1 -1
- package/build/matrices/decompositions.js +87 -89
- package/build/matrices/decompositions.js.map +1 -1
- package/build/matrices/index.d.ts +3 -2
- package/build/matrices/index.d.ts.map +1 -1
- package/build/matrices/index.js +5 -2
- package/build/matrices/index.js.map +1 -1
- package/build/matrices/linear-algebra.d.ts +12 -12
- package/build/matrices/linear-algebra.js +4 -4
- package/build/matrices/normalization.d.ts +8 -8
- package/build/matrices/transformations.d.ts +184 -165
- package/build/matrices/transformations.d.ts.map +1 -1
- package/build/matrices/transformations.js +99 -80
- package/build/matrices/transformations.js.map +1 -1
- package/build/matrices/types.d.ts +12 -12
- package/build/matrices/types.d.ts.map +1 -1
- package/build/quaternions/_exports.d.ts +11 -0
- package/build/quaternions/_exports.d.ts.map +1 -0
- package/build/quaternions/_exports.js +11 -0
- package/build/quaternions/_exports.js.map +1 -0
- package/build/quaternions/asserts.d.ts +115 -7
- package/build/quaternions/asserts.d.ts.map +1 -1
- package/build/quaternions/asserts.js +162 -8
- package/build/quaternions/asserts.js.map +1 -1
- package/build/quaternions/conversions.d.ts +31 -21
- package/build/quaternions/conversions.d.ts.map +1 -1
- package/build/quaternions/conversions.js +28 -18
- package/build/quaternions/conversions.js.map +1 -1
- package/build/quaternions/core.d.ts +67 -39
- package/build/quaternions/core.d.ts.map +1 -1
- package/build/quaternions/core.js +67 -39
- package/build/quaternions/core.js.map +1 -1
- package/build/quaternions/index.d.ts +3 -2
- package/build/quaternions/index.d.ts.map +1 -1
- package/build/quaternions/index.js +5 -2
- package/build/quaternions/index.js.map +1 -1
- package/build/quaternions/interpolation.d.ts +15 -9
- package/build/quaternions/interpolation.d.ts.map +1 -1
- package/build/quaternions/interpolation.js +15 -9
- package/build/quaternions/interpolation.js.map +1 -1
- package/build/quaternions/predefined.d.ts +9 -3
- package/build/quaternions/predefined.d.ts.map +1 -1
- package/build/quaternions/predefined.js +9 -3
- package/build/quaternions/predefined.js.map +1 -1
- package/build/quaternions/types.d.ts +3 -3
- package/build/vectors/_exports.d.ts +10 -0
- package/build/vectors/_exports.d.ts.map +1 -0
- package/build/vectors/_exports.js +10 -0
- package/build/vectors/_exports.js.map +1 -0
- package/build/vectors/asserts.d.ts +153 -49
- package/build/vectors/asserts.d.ts.map +1 -1
- package/build/vectors/asserts.js +202 -52
- package/build/vectors/asserts.js.map +1 -1
- package/build/vectors/core.d.ts +216 -137
- package/build/vectors/core.d.ts.map +1 -1
- package/build/vectors/core.js +212 -149
- package/build/vectors/core.js.map +1 -1
- package/build/vectors/index.d.ts +1 -0
- package/build/vectors/index.d.ts.map +1 -1
- package/build/vectors/index.js +3 -0
- package/build/vectors/index.js.map +1 -1
- package/build/vectors/interpolation.d.ts +39 -27
- package/build/vectors/interpolation.d.ts.map +1 -1
- package/build/vectors/interpolation.js +39 -27
- package/build/vectors/interpolation.js.map +1 -1
- package/build/vectors/predefined.d.ts +48 -24
- package/build/vectors/predefined.d.ts.map +1 -1
- package/build/vectors/predefined.js +38 -18
- package/build/vectors/predefined.js.map +1 -1
- package/package.json +3 -3
|
@@ -14,7 +14,7 @@ export type TAssertVectorArgs = IAssertNumberArgs & IAssertArrayArgs;
|
|
|
14
14
|
* Extended configuration for validating multiple vectors.
|
|
15
15
|
* Includes all single vector options plus multi-vector constraints.
|
|
16
16
|
*/
|
|
17
|
-
interface IAssertVectorsArgs extends TAssertVectorArgs {
|
|
17
|
+
export interface IAssertVectorsArgs extends TAssertVectorArgs {
|
|
18
18
|
/**
|
|
19
19
|
* Minimum vector size allowed.
|
|
20
20
|
* If specified, vectors must have at least this many components.
|
|
@@ -48,21 +48,28 @@ type TAssertVectorValueArgs = IAssertNumberArgs;
|
|
|
48
48
|
* Thrown when vector assertions fail or vector operations encounter invalid data.
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
* ```typescript
|
|
52
|
+
* try {
|
|
53
|
+
* AssertVector("not a vector");
|
|
54
|
+
* } catch (error) {
|
|
55
|
+
* if (error instanceof VectorError) {
|
|
56
|
+
* console.log("Vector validation failed:", error.message);
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
58
60
|
*/
|
|
59
61
|
export declare class VectorError extends Error {
|
|
62
|
+
readonly code: string;
|
|
60
63
|
/**
|
|
61
64
|
* Creates a new VectorError instance.
|
|
62
65
|
*
|
|
63
|
-
* @param message -
|
|
66
|
+
* @param message - Error message describing the validation failure
|
|
67
|
+
* @param options - Optional error context
|
|
68
|
+
* @param options.cause - Original error that caused this error
|
|
64
69
|
*/
|
|
65
|
-
constructor(message?:
|
|
70
|
+
constructor(message: string, options?: {
|
|
71
|
+
cause?: unknown;
|
|
72
|
+
});
|
|
66
73
|
}
|
|
67
74
|
/**
|
|
68
75
|
* Validates that an unknown value is a valid vector (array of numbers).
|
|
@@ -76,16 +83,16 @@ export declare class VectorError extends Error {
|
|
|
76
83
|
* @throws {VectorError} If the value is not a valid vector meeting all constraints
|
|
77
84
|
*
|
|
78
85
|
* @example
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
* ```typescript
|
|
87
|
+
* ```typescript
|
|
88
|
+
* // Basic validation — passes silently for a valid vector
|
|
89
|
+
* AssertVector([1, 2, 3]);
|
|
90
|
+
* // Validate with size constraint
|
|
91
|
+
* AssertVector([1, 2], { size: 2 });
|
|
92
|
+
* // Throws VectorError for non-array input
|
|
93
|
+
* AssertVector("not a vector"); // throws VectorError
|
|
94
|
+
* ```
|
|
95
|
+
* ```
|
|
89
96
|
*/
|
|
90
97
|
export declare function AssertVector(vector: unknown, args?: TAssertVectorArgs, exception?: IAssertVectorException): asserts vector is TVector;
|
|
91
98
|
/**
|
|
@@ -96,11 +103,13 @@ export declare function AssertVector(vector: unknown, args?: TAssertVectorArgs,
|
|
|
96
103
|
* @throws {VectorError} If the value is not a 2-component vector
|
|
97
104
|
*
|
|
98
105
|
* @example
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
* ```typescript
|
|
107
|
+
* ```typescript
|
|
108
|
+
* AssertVector2([1, 2]); // passes
|
|
109
|
+
* AssertVector2([1, 2, 3]); // throws — too many components
|
|
110
|
+
* AssertVector2("not a vec"); // throws
|
|
111
|
+
* ```
|
|
112
|
+
* ```
|
|
104
113
|
*/
|
|
105
114
|
export declare function AssertVector2(vector: unknown, exception?: IAssertVectorException): asserts vector is TVector2;
|
|
106
115
|
/**
|
|
@@ -111,11 +120,13 @@ export declare function AssertVector2(vector: unknown, exception?: IAssertVector
|
|
|
111
120
|
* @throws {VectorError} If the value is not a 3-component vector
|
|
112
121
|
*
|
|
113
122
|
* @example
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
* ```typescript
|
|
124
|
+
* ```typescript
|
|
125
|
+
* AssertVector3([1, 2, 3]); // passes
|
|
126
|
+
* AssertVector3([1, 2]); // throws — too few components
|
|
127
|
+
* AssertVector3(null); // throws
|
|
128
|
+
* ```
|
|
129
|
+
* ```
|
|
119
130
|
*/
|
|
120
131
|
export declare function AssertVector3(vector: unknown, exception?: IAssertVectorException): asserts vector is TVector3;
|
|
121
132
|
/**
|
|
@@ -126,11 +137,13 @@ export declare function AssertVector3(vector: unknown, exception?: IAssertVector
|
|
|
126
137
|
* @throws {VectorError} If the value is not a 4-component vector
|
|
127
138
|
*
|
|
128
139
|
* @example
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
* ```typescript
|
|
141
|
+
* ```typescript
|
|
142
|
+
* AssertVector4([1, 2, 3, 4]); // passes
|
|
143
|
+
* AssertVector4([1, 2, 3]); // throws — too few components
|
|
144
|
+
* AssertVector4(undefined); // throws
|
|
145
|
+
* ```
|
|
146
|
+
* ```
|
|
134
147
|
*/
|
|
135
148
|
export declare function AssertVector4(vector: unknown, exception?: IAssertVectorException): asserts vector is TVector4;
|
|
136
149
|
/**
|
|
@@ -145,13 +158,15 @@ export declare function AssertVector4(vector: unknown, exception?: IAssertVector
|
|
|
145
158
|
* @throws {VectorError} If the value is not a valid number or violates any constraint
|
|
146
159
|
*
|
|
147
160
|
* @example
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
161
|
+
* ```typescript
|
|
162
|
+
* ```typescript
|
|
163
|
+
* AssertVectorValue(3.14); // passes
|
|
164
|
+
* AssertVectorValue(3.14, { finite: true }); // passes
|
|
165
|
+
* AssertVectorValue(Infinity, { finite: true }); // throws
|
|
166
|
+
* AssertVectorValue(NaN); // throws
|
|
167
|
+
* AssertVectorValue(5, { gte: 0, lte: 10 }); // passes
|
|
168
|
+
* ```
|
|
169
|
+
* ```
|
|
155
170
|
*/
|
|
156
171
|
export declare function AssertVectorValue(value: unknown, args?: TAssertVectorValueArgs, exception?: IAssertVectorException): asserts value is number;
|
|
157
172
|
/**
|
|
@@ -165,18 +180,107 @@ export declare function AssertVectorValue(value: unknown, args?: TAssertVectorVa
|
|
|
165
180
|
* @throws {VectorError} If the array is empty, any vector is invalid, or sizes
|
|
166
181
|
* differ when `sameSize` is `true`
|
|
167
182
|
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* // Validate an array of 3D vectors
|
|
186
|
+
* AssertVectors([[1, 2, 3], [4, 5, 6]]);
|
|
187
|
+
* // Require all vectors to share the same length
|
|
188
|
+
* AssertVectors([[1, 2], [3, 4]], { sameSize: true });
|
|
189
|
+
* // Throws because vectors have different sizes
|
|
190
|
+
* AssertVectors([[1, 2], [1, 2, 3]], { sameSize: true }); // throws
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export declare function AssertVectors(vectors: unknown[], args?: IAssertVectorsArgs, exception?: IAssertVectorException): void;
|
|
194
|
+
/**
|
|
195
|
+
* Validates that an unknown value is a valid vector without throwing an error.
|
|
196
|
+
*
|
|
197
|
+
* This function performs the same validation as AssertVector but returns
|
|
198
|
+
* a boolean instead of throwing an exception, making it suitable for
|
|
199
|
+
* conditional logic where exceptions are not desired.
|
|
200
|
+
*
|
|
201
|
+
* @param vector - The value to validate as a vector
|
|
202
|
+
* @param args - Validation configuration options
|
|
203
|
+
* @returns true if the vector is valid, false otherwise
|
|
204
|
+
*
|
|
168
205
|
* @example
|
|
169
206
|
* ```typescript
|
|
170
|
-
*
|
|
171
|
-
*
|
|
207
|
+
* if (ValidateVector([1, 2, 3])) {
|
|
208
|
+
* // Process the valid vector
|
|
209
|
+
* }
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
export declare function ValidateVector(vector: unknown, args?: TAssertVectorArgs): vector is TVector;
|
|
213
|
+
/**
|
|
214
|
+
* Validates that an unknown value is a valid 2D vector without throwing an error.
|
|
172
215
|
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
216
|
+
* @param vector - The value to validate as a 2D vector
|
|
217
|
+
* @returns true if the vector is valid, false otherwise
|
|
175
218
|
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* if (ValidateVector2([1, 2])) {
|
|
222
|
+
* // Process the valid 2D vector
|
|
223
|
+
* }
|
|
178
224
|
* ```
|
|
179
225
|
*/
|
|
180
|
-
export declare function
|
|
226
|
+
export declare function ValidateVector2(vector: unknown): vector is TVector2;
|
|
227
|
+
/**
|
|
228
|
+
* Validates that an unknown value is a valid 3D vector without throwing an error.
|
|
229
|
+
*
|
|
230
|
+
* @param vector - The value to validate as a 3D vector
|
|
231
|
+
* @returns true if the vector is valid, false otherwise
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* if (ValidateVector3([1, 2, 3])) {
|
|
236
|
+
* // Process the valid 3D vector
|
|
237
|
+
* }
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
export declare function ValidateVector3(vector: unknown): vector is TVector3;
|
|
241
|
+
/**
|
|
242
|
+
* Validates that an unknown value is a valid 4D vector without throwing an error.
|
|
243
|
+
*
|
|
244
|
+
* @param vector - The value to validate as a 4D vector
|
|
245
|
+
* @returns true if the vector is valid, false otherwise
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```typescript
|
|
249
|
+
* if (ValidateVector4([1, 2, 3, 4])) {
|
|
250
|
+
* // Process the valid 4D vector
|
|
251
|
+
* }
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
export declare function ValidateVector4(vector: unknown): vector is TVector4;
|
|
255
|
+
/**
|
|
256
|
+
* Validates that an unknown value is a valid vector element without throwing an error.
|
|
257
|
+
*
|
|
258
|
+
* @param value - The value to validate as a vector element
|
|
259
|
+
* @param args - Validation configuration options
|
|
260
|
+
* @returns true if the value is valid, false otherwise
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```typescript
|
|
264
|
+
* if (ValidateVectorValue(1.5)) {
|
|
265
|
+
* // Process the valid element
|
|
266
|
+
* }
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
export declare function ValidateVectorValue(value: unknown, args?: TAssertVectorValueArgs): value is number;
|
|
270
|
+
/**
|
|
271
|
+
* Validates that an unknown value is an array of valid vectors without throwing an error.
|
|
272
|
+
*
|
|
273
|
+
* @param vectors - The value to validate as an array of vectors
|
|
274
|
+
* @param args - Validation configuration options
|
|
275
|
+
* @returns true if all vectors are valid, false otherwise
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* if (ValidateVectors([v1, v2, v3])) {
|
|
280
|
+
* // Process the valid vector array
|
|
281
|
+
* }
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
export declare function ValidateVectors(vectors: unknown[], args?: IAssertVectorsArgs): boolean;
|
|
181
285
|
export {};
|
|
182
286
|
//# sourceMappingURL=asserts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asserts.d.ts","sourceRoot":"","sources":["../../src/vectors/asserts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAuC,MAAM,4BAA4B,CAAC;AACxI,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,iBA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KAAK,IAAI,MAAM,CAOtG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAOtF"}
|
package/build/vectors/asserts.js
CHANGED
|
@@ -9,22 +9,27 @@ import { SetExceptionMessage, ThrowException } from '@pawells/typescript-common'
|
|
|
9
9
|
* Thrown when vector assertions fail or vector operations encounter invalid data.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
* ```typescript
|
|
13
|
+
* try {
|
|
14
|
+
* AssertVector("not a vector");
|
|
15
|
+
* } catch (error) {
|
|
16
|
+
* if (error instanceof VectorError) {
|
|
17
|
+
* console.log("Vector validation failed:", error.message);
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
19
21
|
*/
|
|
20
22
|
export class VectorError extends Error {
|
|
23
|
+
code = 'VECTOR_ERROR';
|
|
21
24
|
/**
|
|
22
25
|
* Creates a new VectorError instance.
|
|
23
26
|
*
|
|
24
|
-
* @param message -
|
|
27
|
+
* @param message - Error message describing the validation failure
|
|
28
|
+
* @param options - Optional error context
|
|
29
|
+
* @param options.cause - Original error that caused this error
|
|
25
30
|
*/
|
|
26
|
-
constructor(message) {
|
|
27
|
-
super(message);
|
|
31
|
+
constructor(message, options) {
|
|
32
|
+
super(message, options);
|
|
28
33
|
this.name = 'VectorError';
|
|
29
34
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
30
35
|
}
|
|
@@ -41,16 +46,16 @@ export class VectorError extends Error {
|
|
|
41
46
|
* @throws {VectorError} If the value is not a valid vector meeting all constraints
|
|
42
47
|
*
|
|
43
48
|
* @example
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
* ```typescript
|
|
50
|
+
* ```typescript
|
|
51
|
+
* // Basic validation — passes silently for a valid vector
|
|
52
|
+
* AssertVector([1, 2, 3]);
|
|
53
|
+
* // Validate with size constraint
|
|
54
|
+
* AssertVector([1, 2], { size: 2 });
|
|
55
|
+
* // Throws VectorError for non-array input
|
|
56
|
+
* AssertVector("not a vector"); // throws VectorError
|
|
57
|
+
* ```
|
|
58
|
+
* ```
|
|
54
59
|
*/
|
|
55
60
|
export function AssertVector(vector, args = {}, exception = {}) {
|
|
56
61
|
// Initialize exception configuration with defaults
|
|
@@ -101,11 +106,13 @@ export function AssertVector(vector, args = {}, exception = {}) {
|
|
|
101
106
|
* @throws {VectorError} If the value is not a 2-component vector
|
|
102
107
|
*
|
|
103
108
|
* @example
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
* ```typescript
|
|
110
|
+
* ```typescript
|
|
111
|
+
* AssertVector2([1, 2]); // passes
|
|
112
|
+
* AssertVector2([1, 2, 3]); // throws — too many components
|
|
113
|
+
* AssertVector2("not a vec"); // throws
|
|
114
|
+
* ```
|
|
115
|
+
* ```
|
|
109
116
|
*/
|
|
110
117
|
export function AssertVector2(vector, exception = {}) {
|
|
111
118
|
AssertVector(vector, { size: 2 }, exception);
|
|
@@ -118,11 +125,13 @@ export function AssertVector2(vector, exception = {}) {
|
|
|
118
125
|
* @throws {VectorError} If the value is not a 3-component vector
|
|
119
126
|
*
|
|
120
127
|
* @example
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
* ```typescript
|
|
129
|
+
* ```typescript
|
|
130
|
+
* AssertVector3([1, 2, 3]); // passes
|
|
131
|
+
* AssertVector3([1, 2]); // throws — too few components
|
|
132
|
+
* AssertVector3(null); // throws
|
|
133
|
+
* ```
|
|
134
|
+
* ```
|
|
126
135
|
*/
|
|
127
136
|
export function AssertVector3(vector, exception = {}) {
|
|
128
137
|
AssertVector(vector, { size: 3 }, exception);
|
|
@@ -135,11 +144,13 @@ export function AssertVector3(vector, exception = {}) {
|
|
|
135
144
|
* @throws {VectorError} If the value is not a 4-component vector
|
|
136
145
|
*
|
|
137
146
|
* @example
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
147
|
+
* ```typescript
|
|
148
|
+
* ```typescript
|
|
149
|
+
* AssertVector4([1, 2, 3, 4]); // passes
|
|
150
|
+
* AssertVector4([1, 2, 3]); // throws — too few components
|
|
151
|
+
* AssertVector4(undefined); // throws
|
|
152
|
+
* ```
|
|
153
|
+
* ```
|
|
143
154
|
*/
|
|
144
155
|
export function AssertVector4(vector, exception = {}) {
|
|
145
156
|
AssertVector(vector, { size: 4 }, exception);
|
|
@@ -156,13 +167,15 @@ export function AssertVector4(vector, exception = {}) {
|
|
|
156
167
|
* @throws {VectorError} If the value is not a valid number or violates any constraint
|
|
157
168
|
*
|
|
158
169
|
* @example
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
* ```typescript
|
|
171
|
+
* ```typescript
|
|
172
|
+
* AssertVectorValue(3.14); // passes
|
|
173
|
+
* AssertVectorValue(3.14, { finite: true }); // passes
|
|
174
|
+
* AssertVectorValue(Infinity, { finite: true }); // throws
|
|
175
|
+
* AssertVectorValue(NaN); // throws
|
|
176
|
+
* AssertVectorValue(5, { gte: 0, lte: 10 }); // passes
|
|
177
|
+
* ```
|
|
178
|
+
* ```
|
|
166
179
|
*/
|
|
167
180
|
export function AssertVectorValue(value, args = {}, exception = {}) {
|
|
168
181
|
// Initialize exception configuration with defaults
|
|
@@ -230,16 +243,14 @@ export function AssertVectorValue(value, args = {}, exception = {}) {
|
|
|
230
243
|
* differ when `sameSize` is `true`
|
|
231
244
|
*
|
|
232
245
|
* @example
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
* AssertVectors([[1, 2], [1, 2, 3]], { sameSize: true }); // throws
|
|
242
|
-
* ```
|
|
246
|
+
* ```typescript
|
|
247
|
+
* // Validate an array of 3D vectors
|
|
248
|
+
* AssertVectors([[1, 2, 3], [4, 5, 6]]);
|
|
249
|
+
* // Require all vectors to share the same length
|
|
250
|
+
* AssertVectors([[1, 2], [3, 4]], { sameSize: true });
|
|
251
|
+
* // Throws because vectors have different sizes
|
|
252
|
+
* AssertVectors([[1, 2], [1, 2, 3]], { sameSize: true }); // throws
|
|
253
|
+
* ```
|
|
243
254
|
*/
|
|
244
255
|
export function AssertVectors(vectors, args, exception) {
|
|
245
256
|
const exc = exception ?? {};
|
|
@@ -282,4 +293,143 @@ export function AssertVectors(vectors, args, exception) {
|
|
|
282
293
|
}
|
|
283
294
|
}
|
|
284
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Validates that an unknown value is a valid vector without throwing an error.
|
|
298
|
+
*
|
|
299
|
+
* This function performs the same validation as AssertVector but returns
|
|
300
|
+
* a boolean instead of throwing an exception, making it suitable for
|
|
301
|
+
* conditional logic where exceptions are not desired.
|
|
302
|
+
*
|
|
303
|
+
* @param vector - The value to validate as a vector
|
|
304
|
+
* @param args - Validation configuration options
|
|
305
|
+
* @returns true if the vector is valid, false otherwise
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* if (ValidateVector([1, 2, 3])) {
|
|
310
|
+
* // Process the valid vector
|
|
311
|
+
* }
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
export function ValidateVector(vector, args = {}) {
|
|
315
|
+
try {
|
|
316
|
+
AssertVector(vector, args);
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Validates that an unknown value is a valid 2D vector without throwing an error.
|
|
325
|
+
*
|
|
326
|
+
* @param vector - The value to validate as a 2D vector
|
|
327
|
+
* @returns true if the vector is valid, false otherwise
|
|
328
|
+
*
|
|
329
|
+
* @example
|
|
330
|
+
* ```typescript
|
|
331
|
+
* if (ValidateVector2([1, 2])) {
|
|
332
|
+
* // Process the valid 2D vector
|
|
333
|
+
* }
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
export function ValidateVector2(vector) {
|
|
337
|
+
try {
|
|
338
|
+
AssertVector2(vector);
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
catch {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Validates that an unknown value is a valid 3D vector without throwing an error.
|
|
347
|
+
*
|
|
348
|
+
* @param vector - The value to validate as a 3D vector
|
|
349
|
+
* @returns true if the vector is valid, false otherwise
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```typescript
|
|
353
|
+
* if (ValidateVector3([1, 2, 3])) {
|
|
354
|
+
* // Process the valid 3D vector
|
|
355
|
+
* }
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
export function ValidateVector3(vector) {
|
|
359
|
+
try {
|
|
360
|
+
AssertVector3(vector);
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Validates that an unknown value is a valid 4D vector without throwing an error.
|
|
369
|
+
*
|
|
370
|
+
* @param vector - The value to validate as a 4D vector
|
|
371
|
+
* @returns true if the vector is valid, false otherwise
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```typescript
|
|
375
|
+
* if (ValidateVector4([1, 2, 3, 4])) {
|
|
376
|
+
* // Process the valid 4D vector
|
|
377
|
+
* }
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
export function ValidateVector4(vector) {
|
|
381
|
+
try {
|
|
382
|
+
AssertVector4(vector);
|
|
383
|
+
return true;
|
|
384
|
+
}
|
|
385
|
+
catch {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Validates that an unknown value is a valid vector element without throwing an error.
|
|
391
|
+
*
|
|
392
|
+
* @param value - The value to validate as a vector element
|
|
393
|
+
* @param args - Validation configuration options
|
|
394
|
+
* @returns true if the value is valid, false otherwise
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```typescript
|
|
398
|
+
* if (ValidateVectorValue(1.5)) {
|
|
399
|
+
* // Process the valid element
|
|
400
|
+
* }
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
export function ValidateVectorValue(value, args = {}) {
|
|
404
|
+
try {
|
|
405
|
+
AssertVectorValue(value, args);
|
|
406
|
+
return true;
|
|
407
|
+
}
|
|
408
|
+
catch {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Validates that an unknown value is an array of valid vectors without throwing an error.
|
|
414
|
+
*
|
|
415
|
+
* @param vectors - The value to validate as an array of vectors
|
|
416
|
+
* @param args - Validation configuration options
|
|
417
|
+
* @returns true if all vectors are valid, false otherwise
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```typescript
|
|
421
|
+
* if (ValidateVectors([v1, v2, v3])) {
|
|
422
|
+
* // Process the valid vector array
|
|
423
|
+
* }
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
export function ValidateVectors(vectors, args) {
|
|
427
|
+
try {
|
|
428
|
+
AssertVectors(vectors, args);
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
catch {
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
285
435
|
//# sourceMappingURL=asserts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asserts.js","sourceRoot":"","sources":["../../src/vectors/asserts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAyD,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AA2CxI
|
|
1
|
+
{"version":3,"file":"asserts.js","sourceRoot":"","sources":["../../src/vectors/asserts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAyD,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AA2CxI;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACrB,IAAI,GAAW,cAAc,CAAC;IAE9C;;;;;;OAMG;IACH,YAAY,OAAe,EAAE,OAA6B;QACzD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe,EAAE,OAA0B,EAAE,EAAE,YAAoC,EAAE;IACjH,mDAAmD;IACnD,MAAM,GAAG,GAA2B,SAAS,IAAI,EAAE,CAAC;IACpD,GAAG,CAAC,KAAK,KAAK,WAAW,CAAC;IAE1B,oCAAoC;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,mBAAmB,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QAC/C,cAAc,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,2CAA2C;IAC3C,MAAM,KAAK,GAAG,MAAmB,CAAC;IAElC,mEAAmE;IACnE,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,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