curvy 2.0.0-alpha.7 → 2.0.0-alpha.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/characteristic/index.mjs +1 -1
- package/dist/curve/index.mjs +1 -1
- package/dist/interval/index.mjs +1 -1
- package/dist/matrix/index.mjs +1 -1
- package/dist/path/index.mjs +4 -4
- package/dist/polynomial/index.mjs +2 -2
- package/dist/shared/{characteristic-D9yZWCym.mjs → characteristic-B0VEB_OA.mjs} +3 -3
- package/dist/shared/{characteristic-D9yZWCym.mjs.map → characteristic-B0VEB_OA.mjs.map} +1 -1
- package/dist/shared/{cubic-BK8xjSkd.mjs → cubic-NEn7E6V_.mjs} +2 -2
- package/dist/shared/{cubic-BK8xjSkd.mjs.map → cubic-NEn7E6V_.mjs.map} +1 -1
- package/dist/shared/{interval2d-BMDmeL1M.mjs → interval2d-C0eduE-V.mjs} +2 -2
- package/dist/shared/{interval2d-BMDmeL1M.mjs.map → interval2d-C0eduE-V.mjs.map} +1 -1
- package/dist/shared/{matrix4x4-qyRufxfs.mjs → matrix4x4-BWmf4lZM.mjs} +3 -3
- package/dist/shared/{matrix4x4-qyRufxfs.mjs.map → matrix4x4-BWmf4lZM.mjs.map} +1 -1
- package/dist/shared/{quadratic-CWXIRh42.mjs → quadratic-Dlxqo2V1.mjs} +2 -2
- package/dist/shared/{quadratic-CWXIRh42.mjs.map → quadratic-Dlxqo2V1.mjs.map} +1 -1
- package/dist/shared/{rationalCubic2d-DaFTrUXw.mjs → rationalCubic2d-3S5K69Jy.mjs} +7 -7
- package/dist/shared/{rationalCubic2d-DaFTrUXw.mjs.map → rationalCubic2d-3S5K69Jy.mjs.map} +1 -1
- package/dist/shared/{rationalCubic2d-BZvT9s5N.mjs → rationalCubic2d-CJY-feGw.mjs} +5 -5
- package/dist/shared/{rationalCubic2d-BZvT9s5N.mjs.map → rationalCubic2d-CJY-feGw.mjs.map} +1 -1
- package/dist/shared/{vector2-CWU3cPB2.mjs → vector2-CSkaMXvp.mjs} +10 -2
- package/dist/shared/vector2-CSkaMXvp.mjs.map +1 -0
- package/dist/shared/{vector2.internal-BL8hFl1c.mjs → vector2.internal-DP1nTBdS.mjs} +17 -2
- package/dist/shared/{vector2.internal-BL8hFl1c.mjs.map → vector2.internal-DP1nTBdS.mjs.map} +1 -1
- package/dist/shared/{vector3-DmMm6pX8.mjs → vector3-CR2LPV03.mjs} +14 -2
- package/dist/shared/vector3-CR2LPV03.mjs.map +1 -0
- package/dist/shared/{vector4-oqPPp45j.mjs → vector4-PO_7EYd-.mjs} +54 -2
- package/dist/shared/{vector4-oqPPp45j.mjs.map → vector4-PO_7EYd-.mjs.map} +1 -1
- package/dist/shared/{vector4.internal-BnnTjVIr.mjs → vector4.internal-BJ1QN2Ck.mjs} +55 -15
- package/dist/shared/vector4.internal-BJ1QN2Ck.mjs.map +1 -0
- package/dist/splines/index.mjs +7 -7
- package/dist/vector/index.mjs +3 -3
- package/dist/vector/vector2.d.ts +80 -0
- package/dist/vector/vector3.d.ts +120 -0
- package/dist/vector/vector4.d.ts +184 -0
- package/package.json +1 -1
- package/dist/shared/vector2-CWU3cPB2.mjs.map +0 -1
- package/dist/shared/vector3-DmMm6pX8.mjs.map +0 -1
- package/dist/shared/vector4.internal-BnnTjVIr.mjs.map +0 -1
package/dist/vector/vector4.d.ts
CHANGED
|
@@ -256,3 +256,187 @@ export declare const scale: {
|
|
|
256
256
|
*/
|
|
257
257
|
(v: Vector4, s: number): Vector4;
|
|
258
258
|
};
|
|
259
|
+
/**
|
|
260
|
+
* Gets the x component of a `Vector4`.
|
|
261
|
+
*
|
|
262
|
+
* @param v - The vector to get the x component of.
|
|
263
|
+
* @returns The x component of the vector.
|
|
264
|
+
* @since 2.0.0
|
|
265
|
+
*/
|
|
266
|
+
export declare const getX: (v: Vector4) => number;
|
|
267
|
+
export declare const setX: {
|
|
268
|
+
/**
|
|
269
|
+
* Sets the x component of a `Vector4`.
|
|
270
|
+
*
|
|
271
|
+
* @param v - The vector to set the x component of.
|
|
272
|
+
* @param x - The new x component.
|
|
273
|
+
* @returns A new `Vector4` instance with the updated x component.
|
|
274
|
+
* @since 2.0.0
|
|
275
|
+
*/
|
|
276
|
+
(v: Vector4, x: number): Vector4;
|
|
277
|
+
/**
|
|
278
|
+
* Sets the x component of a `Vector4`.
|
|
279
|
+
*
|
|
280
|
+
* @param x - The new x component.
|
|
281
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
282
|
+
* @since 2.0.0
|
|
283
|
+
*/
|
|
284
|
+
(x: number): (v: Vector4) => Vector4;
|
|
285
|
+
};
|
|
286
|
+
export declare const mapX: {
|
|
287
|
+
/**
|
|
288
|
+
* Returns a new `Vector4` with the x component replaced by `f(v.x)`.
|
|
289
|
+
*
|
|
290
|
+
* @param v - The vector to update.
|
|
291
|
+
* @param f - The function to apply to the x component.
|
|
292
|
+
* @returns A new `Vector4` with the updated x.
|
|
293
|
+
* @since 2.0.0
|
|
294
|
+
*/
|
|
295
|
+
(v: Vector4, f: (x: number) => number): Vector4;
|
|
296
|
+
/**
|
|
297
|
+
* Returns a new `Vector4` with the x component replaced by `f(v.x)`.
|
|
298
|
+
*
|
|
299
|
+
* @param f - The function to apply to the x component.
|
|
300
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
301
|
+
* @since 2.0.0
|
|
302
|
+
*/
|
|
303
|
+
(f: (x: number) => number): (v: Vector4) => Vector4;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Gets the y component of a `Vector4`.
|
|
307
|
+
*
|
|
308
|
+
* @param v - The vector to get the y component of.
|
|
309
|
+
* @returns The y component of the vector.
|
|
310
|
+
* @since 2.0.0
|
|
311
|
+
*/
|
|
312
|
+
export declare const getY: (v: Vector4) => number;
|
|
313
|
+
export declare const setY: {
|
|
314
|
+
/**
|
|
315
|
+
* Sets the y component of a `Vector4`.
|
|
316
|
+
*
|
|
317
|
+
* @param v - The vector to set the y component of.
|
|
318
|
+
* @param y - The new y component.
|
|
319
|
+
* @returns A new `Vector4` instance with the updated y component.
|
|
320
|
+
* @since 2.0.0
|
|
321
|
+
*/
|
|
322
|
+
(v: Vector4, y: number): Vector4;
|
|
323
|
+
/**
|
|
324
|
+
* Sets the y component of a `Vector4`.
|
|
325
|
+
*
|
|
326
|
+
* @param y - The new y component.
|
|
327
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
328
|
+
* @since 2.0.0
|
|
329
|
+
*/
|
|
330
|
+
(y: number): (v: Vector4) => Vector4;
|
|
331
|
+
};
|
|
332
|
+
export declare const mapY: {
|
|
333
|
+
/**
|
|
334
|
+
* Returns a new `Vector4` with the y component replaced by `f(v.y)`.
|
|
335
|
+
*
|
|
336
|
+
* @param v - The vector to update.
|
|
337
|
+
* @param f - The function to apply to the y component.
|
|
338
|
+
* @returns A new `Vector4` with the updated y.
|
|
339
|
+
* @since 2.0.0
|
|
340
|
+
*/
|
|
341
|
+
(v: Vector4, f: (y: number) => number): Vector4;
|
|
342
|
+
/**
|
|
343
|
+
* Returns a new `Vector4` with the y component replaced by `f(v.y)`.
|
|
344
|
+
*
|
|
345
|
+
* @param f - The function to apply to the y component.
|
|
346
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
347
|
+
* @since 2.0.0
|
|
348
|
+
*/
|
|
349
|
+
(f: (y: number) => number): (v: Vector4) => Vector4;
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Gets the z component of a `Vector4`.
|
|
353
|
+
*
|
|
354
|
+
* @param v - The vector to get the z component of.
|
|
355
|
+
* @returns The z component of the vector.
|
|
356
|
+
* @since 2.0.0
|
|
357
|
+
*/
|
|
358
|
+
export declare const getZ: (v: Vector4) => number;
|
|
359
|
+
export declare const setZ: {
|
|
360
|
+
/**
|
|
361
|
+
* Sets the z component of a `Vector4`.
|
|
362
|
+
*
|
|
363
|
+
* @param v - The vector to set the z component of.
|
|
364
|
+
* @param z - The new z component.
|
|
365
|
+
* @returns A new `Vector4` instance with the updated z component.
|
|
366
|
+
* @since 2.0.0
|
|
367
|
+
*/
|
|
368
|
+
(v: Vector4, z: number): Vector4;
|
|
369
|
+
/**
|
|
370
|
+
* Sets the z component of a `Vector4`.
|
|
371
|
+
*
|
|
372
|
+
* @param z - The new z component.
|
|
373
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
374
|
+
* @since 2.0.0
|
|
375
|
+
*/
|
|
376
|
+
(z: number): (v: Vector4) => Vector4;
|
|
377
|
+
};
|
|
378
|
+
export declare const mapZ: {
|
|
379
|
+
/**
|
|
380
|
+
* Returns a new `Vector4` with the z component replaced by `f(v.z)`.
|
|
381
|
+
*
|
|
382
|
+
* @param v - The vector to update.
|
|
383
|
+
* @param f - The function to apply to the z component.
|
|
384
|
+
* @returns A new `Vector4` with the updated z.
|
|
385
|
+
* @since 2.0.0
|
|
386
|
+
*/
|
|
387
|
+
(v: Vector4, f: (z: number) => number): Vector4;
|
|
388
|
+
/**
|
|
389
|
+
* Returns a new `Vector4` with the z component replaced by `f(v.z)`.
|
|
390
|
+
*
|
|
391
|
+
* @param f - The function to apply to the z component.
|
|
392
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
393
|
+
* @since 2.0.0
|
|
394
|
+
*/
|
|
395
|
+
(f: (z: number) => number): (v: Vector4) => Vector4;
|
|
396
|
+
};
|
|
397
|
+
/**
|
|
398
|
+
* Gets the w component of a `Vector4`.
|
|
399
|
+
*
|
|
400
|
+
* @param v - The vector to get the w component of.
|
|
401
|
+
* @returns The w component of the vector.
|
|
402
|
+
* @since 2.0.0
|
|
403
|
+
*/
|
|
404
|
+
export declare const getW: (v: Vector4) => number;
|
|
405
|
+
export declare const setW: {
|
|
406
|
+
/**
|
|
407
|
+
* Sets the w component of a `Vector4`.
|
|
408
|
+
*
|
|
409
|
+
* @param v - The vector to set the w component of.
|
|
410
|
+
* @param w - The new w component.
|
|
411
|
+
* @returns A new `Vector4` instance with the updated w component.
|
|
412
|
+
* @since 2.0.0
|
|
413
|
+
*/
|
|
414
|
+
(v: Vector4, w: number): Vector4;
|
|
415
|
+
/**
|
|
416
|
+
* Sets the w component of a `Vector4`.
|
|
417
|
+
*
|
|
418
|
+
* @param w - The new w component.
|
|
419
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
420
|
+
* @since 2.0.0
|
|
421
|
+
*/
|
|
422
|
+
(w: number): (v: Vector4) => Vector4;
|
|
423
|
+
};
|
|
424
|
+
export declare const mapW: {
|
|
425
|
+
/**
|
|
426
|
+
* Returns a new `Vector4` with the w component replaced by `f(v.w)`.
|
|
427
|
+
*
|
|
428
|
+
* @param v - The vector to update.
|
|
429
|
+
* @param f - The function to apply to the w component.
|
|
430
|
+
* @returns A new `Vector4` with the updated w.
|
|
431
|
+
* @since 2.0.0
|
|
432
|
+
*/
|
|
433
|
+
(v: Vector4, f: (w: number) => number): Vector4;
|
|
434
|
+
/**
|
|
435
|
+
* Returns a new `Vector4` with the w component replaced by `f(v.w)`.
|
|
436
|
+
*
|
|
437
|
+
* @param f - The function to apply to the w component.
|
|
438
|
+
* @returns A function that takes a vector and returns the updated vector.
|
|
439
|
+
* @since 2.0.0
|
|
440
|
+
*/
|
|
441
|
+
(f: (w: number) => number): (v: Vector4) => Vector4;
|
|
442
|
+
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector2-CWU3cPB2.mjs","names":["internal.isVector2","internal.isWeighted","internal.makeWeighted","internal.withWeight","internal.unweighted","internal.weightedEquals","internal.equals","internal.make","internal.fromTuple","internal.transpose","internal.fromPolar","internal.magnitude","internal.normalize","internal.dot","internal.cross","internal.components","internal.softmax","internal.add","internal.subtract","internal.hadamard","internal.scale","internal.getX","internal.setX","internal.getY","internal.setY","internal.setR","internal.getTheta","internal.setTheta"],"sources":["../../src/vector/vector2.ts"],"sourcesContent":["import type { TwoDimensional } from '../dimensions.ts'\nimport type { Pipeable } from '../utils.ts'\nimport type { Vector2TypeId, WeightedVector2TypeId } from './vector2.internal.ts'\nimport * as internal from './vector2.internal.ts'\n\n/**\n * A 2D vector.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface Vector2 extends Pipeable, TwoDimensional<number> {\n readonly [Vector2TypeId]: Vector2TypeId\n}\n\n/**\n * A 2D point with an associated positive scalar weight.\n *\n * Used by rational primitives (e.g. `RationalBezier2d`) where each control\n * point carries an influence weight. The interface is structurally distinct\n * from `Vector2` — its brand prevents accidental use with vector arithmetic\n * (`add`, `subtract`, `scale`, etc.) where weighted operations are not\n * well-defined.\n *\n * Construct via {@link makeWeighted} (from raw components) or\n * {@link withWeight} (from an existing `Vector2`).\n *\n * @since 2.0.0\n */\nexport interface Weighted extends Pipeable {\n readonly [WeightedVector2TypeId]: WeightedVector2TypeId\n readonly x: number\n readonly y: number\n readonly weight: number\n}\n\n/**\n * Checks if a value is a `Vector2`.\n *\n * @param v - The value to check.\n * @returns `true` if the value is a `Vector2`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isVector2: (v: unknown) => v is Vector2 = internal.isVector2\n\n/**\n * Checks if a value is a `Vector2.Weighted`.\n *\n * @param v - The value to check.\n * @returns `true` if the value is a `Vector2.Weighted`, `false` otherwise.\n * @since 2.0.0\n */\nexport const isWeighted: (v: unknown) => v is Weighted = internal.isWeighted\n\n/**\n * Creates a new `Vector2.Weighted` from raw components. The weight must be\n * finite and positive.\n *\n * @param x - The x component.\n * @param y - The y component.\n * @param weight - The positive scalar weight.\n * @returns A new `Vector2.Weighted` instance.\n * @since 2.0.0\n */\nexport const makeWeighted: (x: number, y: number, weight: number) => Weighted =\n internal.makeWeighted\n\nexport const withWeight: {\n /**\n * Promotes a `Vector2` to a `Vector2.Weighted` by attaching the given\n * positive scalar weight.\n *\n * @param v - The point to weight.\n * @param weight - The positive scalar weight.\n * @returns A new `Vector2.Weighted` instance.\n * @since 2.0.0\n */\n (v: Vector2, weight: number): Weighted\n /**\n * Promotes a `Vector2` to a `Vector2.Weighted` by attaching the given\n * positive scalar weight.\n *\n * @param weight - The positive scalar weight.\n * @returns A function that takes a `Vector2` and returns a weighted point.\n * @since 2.0.0\n */\n (weight: number): (v: Vector2) => Weighted\n} = internal.withWeight\n\n/**\n * Strips the weight from a `Vector2.Weighted`, returning the underlying point.\n *\n * @param w - The weighted point.\n * @returns A new `Vector2` instance with the same x and y components.\n * @since 2.0.0\n */\nexport const unweighted: (w: Weighted) => Vector2 = internal.unweighted\n\nexport const weightedEquals: {\n /**\n * Checks if two `Vector2.Weighted` instances are approximately equal —\n * point components and weight all within the default absolute tolerance.\n *\n * @param a - The first weighted point.\n * @param b - The second weighted point.\n * @returns `true` when components and weight are within tolerance.\n * @since 2.0.0\n */\n (a: Weighted, b: Weighted): boolean\n /**\n * Checks if two `Vector2.Weighted` instances are approximately equal.\n *\n * @param b - The second weighted point.\n * @returns A function that takes the first weighted point and returns the comparison result.\n * @since 2.0.0\n */\n (b: Weighted): (a: Weighted) => boolean\n} = internal.weightedEquals\n\nexport const equals: {\n /**\n * Checks if two `Vector2` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns `true` when each pair of components is within tolerance.\n * @since 1.1.0\n */\n (a: Vector2, b: Vector2): boolean\n /**\n * Checks if two `Vector2` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the comparison result.\n * @since 1.1.0\n */\n (b: Vector2): (a: Vector2) => boolean\n} = internal.equals\n\nexport const make: {\n /**\n * Creates a new `Vector2` instance.\n *\n * @param xy - The x and y components of the vector.\n * @returns A new `Vector2` instance.\n * @since 1.0.0\n */\n (xy: number): Vector2\n /**\n * Creates a new `Vector2` instance.\n *\n * @param x - The x component of the vector.\n * @param y - The y component of the vector.\n * @returns A new `Vector2` instance.\n * @since 1.0.0\n */\n (x: number, y: number): Vector2\n} = internal.make\n\n/**\n * Creates a new `Vector2` instance from a `[x, y]` tuple. Inverse of\n * {@link components}.\n *\n * @param t - The `[x, y]` tuple.\n * @returns A new `Vector2` instance.\n * @since 2.0.0\n */\nexport const fromTuple: (t: readonly [number, number]) => Vector2 = internal.fromTuple\n\n/**\n * Transposes a 2-tuple of items into one or more `Vector2`s, one per channel\n * extracted by the projection function. See {@link Vector4.transpose} for the\n * full operation description; this is the 2-component analog.\n *\n * @param inputs - Exactly two items of any type.\n * @param project - A function returning a fixed-arity tuple of numbers — one per output channel.\n * @returns A tuple of `Vector2`s with the same arity as the projection's return tuple.\n * @since 2.0.0\n */\nexport const transpose: <T, const Channels extends ReadonlyArray<number>>(\n inputs: readonly [T, T],\n project: (item: T) => Channels,\n) => { readonly [K in keyof Channels]: Vector2 } = internal.transpose\n\n/**\n * Creates a new `Vector2` instance from polar coordinates.\n *\n * @param r - The radius.\n * @param theta - The angle, in radians.\n * @returns A new `Vector2` instance.\n * @since 1.0.0\n */\nexport const fromPolar: (r: number, theta: number) => Vector2 = internal.fromPolar\n\n/**\n * Calculates the magnitude of a `Vector2`.\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: Vector2) => number = internal.magnitude\n\n/**\n * Normalizes a `Vector2`.\n *\n * @param vector - The vector to normalize.\n * @returns A new `Vector2` instance with the same direction and a magnitude of 1.\n * @since 1.0.0\n */\nexport const normalize: (vector: Vector2) => Vector2 = internal.normalize\n\nexport const dot: {\n /**\n * Calculates the dot product of two `Vector2` 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: Vector2, b: Vector2): number\n /**\n * Calculates the dot product of two `Vector2` instances.\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: Vector2): (a: Vector2) => number\n} = internal.dot\n\nexport const cross: {\n /**\n * Calculates the cross product of two `Vector2` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns The cross product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector2, b: Vector2): number\n /**\n * Calculates the cross product of two `Vector2` instances.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the cross product.\n * @since 1.0.0\n */\n (b: Vector2): (a: Vector2) => number\n} = internal.cross\n\n/**\n * Returns the components of a `Vector2` as an array.\n *\n * @param r - The radius.\n * @param theta - The angle, in radians.\n * @returns A new `Vector2` instance.\n * @since 1.0.0\n */\nexport const components: (v: Vector2) => [number, number] = internal.components\n\n/**\n * Applies the softmax function to a `Vector2`.\n *\n * @param v - The vector to apply the softmax function to.\n * @returns A new `Vector2` instance with the softmax applied.\n * @since 1.0.0\n */\nexport const softmax: (v: Vector2) => Vector2 = internal.softmax\n\n/**\n * Creates a zero vector.\n *\n * @returns A new `Vector2` instance with both components set to 0.\n * @since 1.0.0\n */\nexport const zero = make(0)\n\n/**\n * Creates a unit vector.\n *\n * @returns A new `Vector2` instance with both components set to 1.\n * @since 1.0.0\n */\nexport const unit = make(1)\n\nexport const add: {\n /**\n * Adds two `Vector2` instances together.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector2` instance representing the sum of the two vectors.\n * @since 1.0.0\n */\n (a: Vector2, b: Vector2): Vector2\n /**\n * Adds two `Vector2` instances together.\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: Vector2): (a: Vector2) => Vector2\n} = internal.add\n\nexport const subtract: {\n /**\n * Subtracts one `Vector2` instance from another.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector2` instance representing the difference of the two vectors.\n * @since 1.0.0\n */\n (a: Vector2, b: Vector2): Vector2\n /**\n * Subtracts one `Vector2` instance from another.\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: Vector2): (a: Vector2) => Vector2\n} = internal.subtract\n\nexport const hadamard: {\n /**\n * Performs the Hadamard product of two `Vector2` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector2` instance representing the Hadamard product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector2, b: Vector2): Vector2\n /**\n * Performs the Hadamard product of two `Vector2` instances.\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: Vector2): (a: Vector2) => Vector2\n} = internal.hadamard\n\nexport const scale: {\n /**\n * Scales a `Vector2` by a scalar value.\n *\n * @param s - The scalar value to scale by.\n * @returns A function that takes a vector and returns the scaled vector.\n * @since 1.0.0\n */\n (s: number): (v: Vector2) => Vector2\n /**\n * Scales a `Vector2` by a scalar value.\n *\n * @param v - The vector to scale.\n * @param s - The scalar value to scale by.\n * @returns A new `Vector2` instance representing the scaled vector.\n * @since 1.0.0\n */\n (v: Vector2, s: number): Vector2\n} = internal.scale\n\n/**\n * Gets the x component of a `Vector2`.\n *\n * @param v - The vector to get the x component from.\n * @returns The x component of the vector.\n * @since 1.0.0\n */\nexport const getX: (v: Vector2) => number = internal.getX\n\nexport const setX: {\n /**\n * Sets the x component of a `Vector2`.\n *\n * @param v - The vector to set the x component of.\n * @param x - The new x component.\n * @returns A new `Vector2` instance with the updated x component.\n * @since 1.0.0\n */\n (v: Vector2, x: number): Vector2\n /**\n * Sets the x component of a `Vector2`.\n *\n * @param x - The new x component.\n * @returns A function that takes a vector and returns the updated vector.\n * @since 1.0.0\n */\n (x: number): (v: Vector2) => Vector2\n} = internal.setX\n\n/**\n * Gets the y component of a `Vector2`.\n *\n * @param v - The vector to get the y component from.\n * @returns The y component of the vector.\n * @since 1.0.0\n */\nexport const getY: (v: Vector2) => number = internal.getY\n\nexport const setY: {\n /**\n * Sets the y component of a `Vector2`.\n *\n * @param v - The vector to set the y component of.\n * @param y - The new y component.\n * @returns A new `Vector2` instance with the updated y component.\n * @since 1.0.0\n */\n (v: Vector2, y: number): Vector2\n /**\n * Sets the y component of a `Vector2`.\n *\n * @param y - The new y component.\n * @returns A function that takes a vector and returns the updated vector.\n * @since 1.0.0\n */\n (y: number): (v: Vector2) => Vector2\n} = internal.setY\n\n/**\n * Gets the radius of a `Vector2`.\n *\n * @param v - The vector to get the radius from.\n * @returns The radius of the vector.\n * @since 1.0.0\n */\nexport const getR: (v: Vector2) => number = magnitude\n\nexport const setR: {\n /**\n * Sets the radius of a `Vector2`.\n *\n * @param v - The vector to set the radius of.\n * @param r - The new radius.\n * @returns A new `Vector2` instance with the updated radius.\n * @since 1.0.0\n */\n (v: Vector2, r: number): Vector2\n /**\n * Sets the radius of a `Vector2`.\n *\n * @param r - The new radius.\n * @returns A function that takes a vector and returns the updated vector.\n * @since 1.0.0\n */\n (r: number): (v: Vector2) => Vector2\n} = internal.setR\n\n/**\n * Gets the angle of a `Vector2`.\n *\n * @param v - The vector to get the angle from.\n * @returns The angle of the vector in radians.\n * @since 1.0.0\n */\nexport const getTheta: (v: Vector2) => number = internal.getTheta\n\nexport const setTheta: {\n /**\n * Sets the angle of a `Vector2`.\n *\n * @param v - The vector to set the angle of.\n * @param theta - The new angle, in radians.\n * @returns A new `Vector2` instance with the updated angle.\n * @since 1.0.0\n */\n (v: Vector2, theta: number): Vector2\n /**\n * Sets the angle of a `Vector2`.\n *\n * @param theta - The new angle, in radians.\n * @returns A function that takes a vector and returns the updated vector.\n * @since 1.0.0\n */\n (theta: number): (v: Vector2) => Vector2\n} = internal.setTheta\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,YAA0CA;;;;;;;;AASvD,MAAa,aAA4CC;;;;;;;;;;;AAYzD,MAAa,eACXC;AAEF,MAAa,aAoBTC;;;;;;;;AASJ,MAAa,aAAuCC;AAEpD,MAAa,iBAmBTC;AAEJ,MAAa,SAoBTC;AAEJ,MAAa,OAkBTC;;;;;;;;;AAUJ,MAAa,YAAuDC;;;;;;;;;;;AAYpE,MAAa,YAGsCC;;;;;;;;;AAUnD,MAAa,YAAmDC;;;;;;;;AAShE,MAAa,YAAyCC;;;;;;;;AAStD,MAAa,YAA0CC;AAEvD,MAAa,MAkBTC;AAEJ,MAAa,QAkBTC;;;;;;;;;AAUJ,MAAa,aAA+CC;;;;;;;;AAS5D,MAAa,UAAmCC;;;;;;;AAQhD,MAAa,OAAO,KAAK,EAAE;;;;;;;AAQ3B,MAAa,OAAO,KAAK,EAAE;AAE3B,MAAa,MAkBTC;AAEJ,MAAa,WAkBTC;AAEJ,MAAa,WAkBTC;AAEJ,MAAa,QAkBTC;;;;;;;;AASJ,MAAa,OAA+BC;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,OAA+BC;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,OAA+B;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,WAAmCC;AAEhD,MAAa,WAkBTC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector3-DmMm6pX8.mjs","names":["internal.isVector3","internal.equals","internal.make","internal.fromTuple","internal.transpose","internal.fromSpherical","internal.magnitude","internal.normalize","internal.dot","internal.cross","internal.components","internal.softmax","internal.add","internal.subtract","internal.hadamard","internal.scale","internal.getX","internal.setX","internal.getY","internal.setY","internal.getZ","internal.setZ","internal.setR","internal.getTheta","internal.setTheta","internal.getPhi","internal.setPhi"],"sources":["../../src/vector/vector3.ts"],"sourcesContent":["import type { ThreeDimensional } from '../dimensions.ts'\nimport type { Pipeable } from '../utils.ts'\nimport type { Vector3TypeId } from './vector3.internal.ts'\nimport * as internal from './vector3.internal.ts'\n\n/**\n * A 3D vector.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface Vector3 extends Pipeable, ThreeDimensional<number> {\n readonly [Vector3TypeId]: Vector3TypeId\n}\n\n/**\n * Checks if a value is a `Vector3`.\n *\n * @param v - The value to check.\n * @returns `true` if the value is a `Vector3`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isVector3: (v: unknown) => v is Vector3 = internal.isVector3\n\nexport const equals: {\n /**\n * Checks if two `Vector3` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns `true` when each pair of components is within tolerance.\n * @since 1.1.0\n */\n (a: Vector3, b: Vector3): boolean\n /**\n * Checks if two `Vector3` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the comparison result.\n * @since 1.1.0\n */\n (b: Vector3): (a: Vector3) => boolean\n} = internal.equals\n\nexport const make: {\n /**\n * Creates a new `Vector3` instance.\n *\n * @param xyz - The x, y, and z components of the vector.\n * @returns A new `Vector3` instance.\n * @since 1.0.0\n */\n (xyz: number): Vector3\n /**\n * Creates a new `Vector3` instance.\n *\n * @param x - The x component of the vector.\n * @param yz - The y and z components of the vector.\n * @returns A new `Vector3` instance.\n * @since 1.0.0\n */\n (x: number, yz: number): Vector3\n /**\n * Creates a new `Vector3` 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 * @returns A new `Vector3` instance.\n * @since 1.0.0\n */\n (x: number, y: number, z: number): Vector3\n} = internal.make\n\n/**\n * Creates a new `Vector3` instance from a `[x, y, z]` tuple. Inverse of\n * {@link components}.\n *\n * @param t - The `[x, y, z]` tuple.\n * @returns A new `Vector3` instance.\n * @since 2.0.0\n */\nexport const fromTuple: (t: readonly [number, number, number]) => Vector3 = internal.fromTuple\n\n/**\n * Transposes a 3-tuple of items into one or more `Vector3`s, one per channel\n * extracted by the projection function. See {@link Vector4.transpose} for the\n * full operation description; this is the 3-component analog.\n *\n * @param inputs - Exactly three items of any type.\n * @param project - A function returning a fixed-arity tuple of numbers — one per output channel.\n * @returns A tuple of `Vector3`s with the same arity as the projection's return tuple.\n * @since 2.0.0\n */\nexport const transpose: <T, const Channels extends ReadonlyArray<number>>(\n inputs: readonly [T, T, T],\n project: (item: T) => Channels,\n) => { readonly [K in keyof Channels]: Vector3 } = internal.transpose\n\n/**\n * Creates a new `Vector3` instance from spherical coordinates.\n *\n * @param r - The radius.\n * @param theta - The polar angle, in radians. Ranges from 0 to π\n * @param phi - The azimuthal angle, in radians. Ranges from 0 to 2π\n * @returns A new `Vector3` instance.\n * @since 1.0.0\n */\nexport const fromSpherical: (r: number, theta: number, phi: number) => Vector3 =\n internal.fromSpherical\n\n/**\n * Calculates the magnitude of a `Vector3`.\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: Vector3) => number = internal.magnitude\n\n/**\n * Calculates the length of a `Vector3`.\n *\n * @param vector - The vector to calculate the length of.\n * @returns The length of the vector.\n * @see {@link magnitude}\n * @since 1.0.0\n */\nexport const length: (vector: Vector3) => number = magnitude\n\n/**\n * Normalizes a `Vector3`.\n *\n * @param vector - The vector to normalize.\n * @returns A new `Vector3` 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: Vector3) => Vector3 = internal.normalize\n\nexport const dot: {\n /**\n * Calculates the dot product of two `Vector3` 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: Vector3, b: Vector3): number\n /**\n * Calculates the dot product of two `Vector3` instances.\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: Vector3): (a: Vector3) => number\n} = internal.dot\n\nexport const cross: {\n /**\n * Calculates the cross product of two `Vector3` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector3` instance representing the cross product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector3, b: Vector3): Vector3\n /**\n * Calculates the cross product of two `Vector3` instances.\n *\n * @param b - The second vector.\n * @returns A function that takes the first vector and returns the cross product.\n * @since 1.0.0\n */\n (b: Vector3): (a: Vector3) => Vector3\n} = internal.cross\n\n/**\n * Returns the components of a `Vector3` as an array.\n *\n * @param v - The vector to get the components of.\n * @returns An array containing the x, y, and z components of the vector.\n * @since 1.0.0\n */\nexport const components: (v: Vector3) => [number, number, number] = internal.components\n\n/**\n * Calculates the softmax of a `Vector3`.\n *\n * @param v - The vector to calculate the softmax of.\n * @returns A new `Vector3` instance representing the softmax of the input vector.\n * @since 1.0.0\n */\nexport const softmax: (v: Vector3) => Vector3 = 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\n/**\n * Creates a unit vector in the x direction.\n *\n * @since 1.0.0\n */\nexport const unitX = make(1, 0, 0)\n\n/**\n * Creates a unit vector in the y direction.\n *\n * @since 1.0.0\n */\nexport const unitY = make(0, 1, 0)\n\n/**\n * Creates a unit vector in the z direction.\n *\n * @since 1.0.0\n */\nexport const unitZ = make(0, 0, 1)\n\nexport const add: {\n /**\n * Adds two `Vector3` instances.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector3` instance representing the sum of the two vectors.\n * @since 1.0.0\n */\n (a: Vector3, b: Vector3): Vector3\n /**\n * Adds two `Vector3` instances.\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: Vector3): (a: Vector3) => Vector3\n} = internal.add\n\nexport const subtract: {\n /**\n * Subtracts one `Vector3` instance from another.\n *\n * @param a - The vector to subtract from.\n * @param b - The vector to subtract.\n * @returns A new `Vector3` instance representing the difference of the two vectors.\n * @since 1.0.0\n */\n (a: Vector3, b: Vector3): Vector3\n /**\n * Subtracts one `Vector3` instance from another.\n *\n * @param b - The vector to subtract.\n * @returns A function that takes the first vector and returns the difference.\n * @since 1.0.0\n */\n (b: Vector3): (a: Vector3) => Vector3\n} = internal.subtract\n\nexport const hadamard: {\n /**\n * Calculates the Hadamard product of two `Vector3` instances.\n *\n * The Hadamard product is an element-wise multiplication of two vectors.\n *\n * @param a - The first vector.\n * @param b - The second vector.\n * @returns A new `Vector3` instance representing the Hadamard product of the two vectors.\n * @since 1.0.0\n */\n (a: Vector3, b: Vector3): Vector3\n /**\n * Calculates the Hadamard product of two `Vector3` instances.\n *\n * The Hadamard product is an element-wise multiplication of two vectors.\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: Vector3): (a: Vector3) => Vector3\n} = internal.hadamard\n\nexport const scale: {\n /**\n * Scales a `Vector3` instance by a scalar value.\n *\n * @param s - The scalar value to scale by.\n * @return A function that takes a vector and returns the scaled vector.\n * @since 1.0.0\n */\n (s: number): (v: Vector3) => Vector3\n /**\n * Scales a `Vector3` instance by a scalar value.\n *\n * @param s - The scalar value to scale by.\n * @param v - The vector to scale.\n * @returns A new `Vector3` instance representing the scaled vector.\n * @since 1.0.0\n */\n (v: Vector3, s: number): Vector3\n} = internal.scale\n\n/**\n * Gets the x component of a `Vector3`.\n *\n * @param v - The vector to get the x component of.\n * @returns The x component of the vector.\n * @since 1.0.0\n */\nexport const getX: (v: Vector3) => number = internal.getX\n\nexport const setX: {\n /**\n * Sets the x component of a `Vector3`.\n *\n * @param v - The vector to set the x component of.\n * @param x - The new x component.\n * @returns A new `Vector3` instance with the updated x component.\n * @since 1.0.0\n */\n (v: Vector3, x: number): Vector3\n /**\n * Sets the x component of a `Vector3`.\n *\n * @param x - The new x component.\n * @returns A function that takes the vector and returns a new `Vector3` instance with the updated x component.\n * @since 1.0.0\n */\n (x: number): (v: Vector3) => Vector3\n} = internal.setX\n\n/**\n * Gets the y component of a `Vector3`.\n *\n * @param v - The vector of which to get the y component.\n * @returns The y component of the vector.\n * @since 1.0.0\n */\nexport const getY: (v: Vector3) => number = internal.getY\n\nexport const setY: {\n /**\n * Sets the y component of a `Vector3`.\n *\n * @param v - The vector of which to set the y component.\n * @param y - The new y component.\n * @returns A new `Vector3` instance with the updated y component.\n * @since 1.0.0\n */\n (v: Vector3, y: number): Vector3\n /**\n * Sets the y component of a `Vector3`.\n *\n * @param y - The new y component.\n * @returns A function that takes the vector and returns a new `Vector3` instance with the updated y component.\n * @since 1.0.0\n */\n (y: number): (v: Vector3) => Vector3\n} = internal.setY\n\n/**\n * Gets the z component of a `Vector3`.\n *\n * @param v - The vector of which to get the z component.\n * @returns The z component of the vector.\n * @since 1.0.0\n */\nexport const getZ: (v: Vector3) => number = internal.getZ\n\nexport const setZ: {\n /**\n * Sets the z component of a `Vector3`.\n *\n * @param v - The vector of which to set the z component.\n * @param z - The new z component.\n * @returns A new `Vector3` instance with the updated z component.\n * @since 1.0.0\n */\n (v: Vector3, z: number): Vector3\n /**\n * Sets the z component of a `Vector3`.\n *\n * @param z - The new z component.\n * @returns A function that takes the vector and returns a new `Vector3` instance with the updated z component.\n * @since 1.0.0\n */\n (z: number): (v: Vector3) => Vector3\n} = internal.setZ\n\n/**\n * Gets the radius of a `Vector3`.\n *\n * @param v - The vector of which to get the radius.\n * @returns The radius of the vector.\n * @since 1.0.0\n */\nexport const getR: (v: Vector3) => number = magnitude\n\nexport const setR: {\n /**\n * Sets the radius of a `Vector3`.\n *\n * @param v - The vector of which to set the radius.\n * @param r - The new radius.\n * @returns A new `Vector3` instance with the updated radius.\n * @since 1.0.0\n */\n (v: Vector3, r: number): Vector3\n /**\n * Sets the radius of a `Vector3`.\n *\n * @param r - The new radius.\n * @returns A function that takes the vector and returns the updated vector.\n * @since 1.0.0\n */\n (r: number): (v: Vector3) => Vector3\n} = internal.setR\n\n/**\n * Gets the polar angle (theta) of a `Vector3`.\n *\n * @param v - The vector of which to get the polar angle.\n * @returns The polar angle of the vector.\n * @since 1.0.0\n */\nexport const getTheta: (v: Vector3) => number = internal.getTheta\n\nexport const setTheta: {\n /**\n * Sets the polar angle (theta) of a `Vector3`.\n *\n * @param v - The vector of which to set the polar angle.\n * @param theta - The new polar angle.\n * @returns A new `Vector3` instance with the updated polar angle.\n * @since 1.0.0\n */\n (v: Vector3, theta: number): Vector3\n /**\n * Sets the polar angle (theta) of a `Vector3`.\n *\n * @param theta - The new polar angle.\n * @returns A function that takes the vector and returns the updated vector.\n * @since 1.0.0\n */\n (theta: number): (v: Vector3) => Vector3\n} = internal.setTheta\n\n/**\n * Gets the azimuthal angle (phi) of a `Vector3`.\n *\n * @param v - The vector of which to get the azimuthal angle.\n * @returns The azimuthal angle of the vector.\n * @since 1.0.0\n */\nexport const getPhi: (v: Vector3) => number = internal.getPhi\n\nexport const setPhi: {\n /**\n * Sets the azimuthal angle (phi) of a `Vector3`.\n *\n * @param v - The vector of which to set the azimuthal angle.\n * @param phi - The new azimuthal angle.\n * @returns A new `Vector3` instance with the updated azimuthal angle.\n * @since 1.0.0\n */\n (v: Vector3, phi: number): Vector3\n /**\n * Sets the azimuthal angle (phi) of a `Vector3`.\n *\n * @param phi - The new azimuthal angle.\n * @returns A function that takes the vector and returns the updated vector.\n * @since 1.0.0\n */\n (phi: number): (v: Vector3) => Vector3\n} = internal.setPhi\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,YAA0CA;AAEvD,MAAa,SAoBTC;AAEJ,MAAa,OA4BTC;;;;;;;;;AAUJ,MAAa,YAA+DC;;;;;;;;;;;AAY5E,MAAa,YAGsCC;;;;;;;;;;AAWnD,MAAa,gBACXC;;;;;;;;AASF,MAAa,YAAyCC;;;;;;;;;AAUtD,MAAa,SAAsC;;;;;;;;AASnD,MAAa,YAA0CC;AAEvD,MAAa,MAkBTC;AAEJ,MAAa,QAkBTC;;;;;;;;AASJ,MAAa,aAAuDC;;;;;;;;AASpE,MAAa,UAAmCC;;;;;;AAOhD,MAAa,OAAO,KAAK,EAAE;;;;;;AAO3B,MAAa,OAAO,KAAK,EAAE;;;;;;AAO3B,MAAa,QAAQ,KAAK,GAAG,GAAG,EAAE;;;;;;AAOlC,MAAa,QAAQ,KAAK,GAAG,GAAG,EAAE;;;;;;AAOlC,MAAa,QAAQ,KAAK,GAAG,GAAG,EAAE;AAElC,MAAa,MAkBTC;AAEJ,MAAa,WAkBTC;AAEJ,MAAa,WAsBTC;AAEJ,MAAa,QAkBTC;;;;;;;;AASJ,MAAa,OAA+BC;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,OAA+BC;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,OAA+BC;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,OAA+B;AAE5C,MAAa,OAkBTC;;;;;;;;AASJ,MAAa,WAAmCC;AAEhD,MAAa,WAkBTC;;;;;;;;AASJ,MAAa,SAAiCC;AAE9C,MAAa,SAkBTC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector4.internal-BnnTjVIr.mjs","names":["equals","make","fromTuple","transpose","magnitude","normalize","dot","components","softmax","add","subtract","hadamard","scale"],"sources":["../../src/vector/vector3.internal.ts","../../src/vector/vector4.internal.ts"],"sourcesContent":["import { dual, Pipeable } from '../utils.ts'\nimport { epsEquals } from '../number.ts'\nimport type { Vector3 } from './vector3.ts'\n\nexport const Vector3TypeId: unique symbol = Symbol.for('curvy/vector3')\nexport type Vector3TypeId = typeof Vector3TypeId\n\nclass Vector3Impl extends Pipeable implements Vector3 {\n readonly [Vector3TypeId]: Vector3TypeId = Vector3TypeId\n\n readonly x: number\n readonly y: number\n readonly z: number\n\n constructor(v0 = 0, v1 = 0, v2 = 0) {\n super()\n this.x = v0\n this.y = v1\n this.z = v2\n }\n\n get [0]() {\n return this.x\n }\n\n get [1]() {\n return this.y\n }\n\n get [2]() {\n return this.z\n }\n\n get [Symbol.toStringTag]() {\n return `Vector3(${this.x}, ${this.y}, ${this.z})`\n }\n\n get [Symbol.for('nodejs.util.inspect.custom')]() {\n return this[Symbol.toStringTag]\n }\n}\n\n/** @internal */\nexport const isVector3 = (v: unknown): v is Vector3 =>\n typeof v === 'object' && v !== null && Vector3TypeId in v\n\n/** @internal */\nexport const equals = dual<\n (b: Vector3) => (a: Vector3) => boolean,\n (a: Vector3, b: Vector3) => boolean\n>(2, (a: Vector3, b: Vector3) => epsEquals(a.x, b.x) && epsEquals(a.y, b.y) && epsEquals(a.z, b.z))\n\n/** @internal */\nexport const make = (v0: number, v1 = v0, v2 = v1): Vector3 => new Vector3Impl(v0, v1, v2)\n\n/** @internal */\nexport const fromTuple = (t: readonly [number, number, number]): Vector3 =>\n new Vector3Impl(t[0], t[1], t[2])\n\n/** @internal */\nexport const transpose = <T, const Channels extends ReadonlyArray<number>>(\n inputs: readonly [T, T, T],\n project: (item: T) => Channels,\n): { readonly [K in keyof Channels]: Vector3 } => {\n const a = project(inputs[0])\n const b = project(inputs[1])\n const c = project(inputs[2])\n const result: Array<Vector3> = []\n for (let i = 0; i < a.length; i++) {\n result.push(make(a[i] as number, b[i] as number, c[i] as number))\n }\n return result as never\n}\n\n/** @internal */\nexport const fromSpherical = (r: number, theta: number, phi: number) =>\n new Vector3Impl(\n r * Math.sin(theta) * Math.cos(phi),\n r * Math.sin(theta) * Math.sin(phi),\n r * Math.cos(theta),\n )\n\n/** @internal */\nexport const magnitude = (vector: Vector3) => Math.hypot(vector.x, vector.y, vector.z)\n\n/** @internal */\nexport const normalize = (vector: Vector3) => {\n const m = magnitude(vector)\n\n return make(vector.x / m, vector.y / m, vector.z / m)\n}\n\n/** @internal */\nexport const dot = dual<(b: Vector3) => (a: Vector3) => number, (a: Vector3, b: Vector3) => number>(\n 2,\n (a: Vector3, b: Vector3) => a.x * b.x + a.y * b.y + a.z * b.z,\n)\n\n/** @internal */\nexport const cross = dual<\n (b: Vector3) => (a: Vector3) => Vector3,\n (a: Vector3, b: Vector3) => Vector3\n>(2, (a: Vector3, b: Vector3) => {\n const x = a.y * b.z - a.z * b.y\n const y = a.z * b.x - a.x * b.z\n const z = a.x * b.y - a.y * b.x\n\n return make(x, y, z)\n})\n\n/** @internal */\nexport const components: (v: Vector3) => [number, number, number] = (v: Vector3) => [v.x, v.y, v.z]\n\n/** @internal */\nexport const softmax = (v: Vector3) => {\n const max = Math.max(v.x, v.y, v.z)\n\n const v0 = Math.exp(v.x - max)\n const v1 = Math.exp(v.y - max)\n const v2 = Math.exp(v.z - max)\n\n const sum = v0 + v1 + v2\n\n return make(v0 / sum, v1 / sum, v2 / sum)\n}\n\n/** @internal */\nexport const add = dual<\n (b: Vector3) => (a: Vector3) => Vector3,\n (a: Vector3, b: Vector3) => Vector3\n>(2, (a: Vector3, b: Vector3) => make(a.x + b.x, a.y + b.y, a.z + b.z))\n\n/** @internal */\nexport const subtract = dual<\n (b: Vector3) => (a: Vector3) => Vector3,\n (a: Vector3, b: Vector3) => Vector3\n>(2, (a: Vector3, b: Vector3) => make(a.x - b.x, a.y - b.y, a.z - b.z))\n\n/** @internal */\nexport const hadamard = dual<\n (b: Vector3) => (a: Vector3) => Vector3,\n (a: Vector3, b: Vector3) => Vector3\n>(2, (a: Vector3, b: Vector3) => make(a.x * b.x, a.y * b.y, a.z * b.z))\n\n/** @internal */\nexport const scale = dual<\n (s: number) => (v: Vector3) => Vector3,\n (v: Vector3, s: number) => Vector3\n>(2, (v: Vector3, s: number) => (s === 1 ? v : make(v.x * s, v.y * s, v.z * s)))\n\n/** @internal */\nexport const getX: (v: Vector3) => number = (v: Vector3) => v.x\n/** @internal */\nexport const setX = dual<\n (x: number) => (v: Vector3) => Vector3,\n (v: Vector3, x: number) => Vector3\n>(2, (v: Vector3, x: number) => make(x, v.y, v.z))\n\n/** @internal */\nexport const getY: (v: Vector3) => number = (v: Vector3) => v.y\n/** @internal */\nexport const setY = dual<\n (y: number) => (v: Vector3) => Vector3,\n (v: Vector3, y: number) => Vector3\n>(2, (v: Vector3, y: number) => make(v.x, y, v.z))\n\n/** @internal */\nexport const getZ: (v: Vector3) => number = (v: Vector3) => v.z\n/** @internal */\nexport const setZ = dual<\n (z: number) => (v: Vector3) => Vector3,\n (v: Vector3, z: number) => Vector3\n>(2, (v: Vector3, z: number) => make(v.x, v.y, z))\n\n/** @internal */\nexport const setR = dual<\n (r: number) => (v: Vector3) => Vector3,\n (v: Vector3, r: number) => Vector3\n>(2, (v: Vector3, r: number) => scale(r / magnitude(v))(v))\n\n/** @internal */\nexport const getTheta = (v: Vector3) => Math.acos(v.z / magnitude(v))\n/** @internal */\nexport const setTheta = dual<\n (phi: number) => (v: Vector3) => Vector3,\n (v: Vector3, phi: number) => Vector3\n>(2, (v: Vector3, phi: number) => {\n const m = magnitude(v)\n const sinTheta = Math.sin(phi)\n return make(m * sinTheta * Math.cos(v.y), m * sinTheta * Math.sin(v.y), m * Math.cos(phi))\n})\n\n/** @internal */\nexport const getPhi = (v: Vector3) => Math.atan2(v.y, v.x)\n/** @internal */\nexport const setPhi = dual<\n (theta: number) => (v: Vector3) => Vector3,\n (v: Vector3, theta: number) => Vector3\n>(2, (v: Vector3, theta: number) => {\n const m = magnitude(v)\n return make(m * Math.cos(theta), m * Math.sin(theta), v.z)\n})\n","import { dual, Pipeable } from '../utils.ts'\nimport { epsEquals } from '../number.ts'\nimport type { Vector4 } from './vector4.ts'\n\nexport const Vector4TypeId: unique symbol = Symbol.for('curvy/vector4')\nexport type Vector4TypeId = typeof Vector4TypeId\n\nclass Vector4Impl extends Pipeable implements Vector4 {\n readonly [Vector4TypeId]: Vector4TypeId = Vector4TypeId\n\n readonly x: number\n readonly y: number\n readonly z: number\n readonly w: number\n\n constructor(v0 = 0, v1 = 0, v2 = 0, v3 = 0) {\n super()\n\n this.x = v0\n this.y = v1\n this.z = v2\n this.w = v3\n }\n\n get [0]() {\n return this.x\n }\n\n get [1]() {\n return this.y\n }\n\n get [2]() {\n return this.z\n }\n\n get [3]() {\n return this.w\n }\n\n get [Symbol.toStringTag]() {\n return `Vector4(${this.x}, ${this.y}, ${this.z}, ${this.w})`\n }\n\n get [Symbol.for('nodejs.util.inspect.custom')]() {\n return this[Symbol.toStringTag]\n }\n}\n\n/** @internal */\nexport const isVector4 = (v: unknown): v is Vector4 =>\n typeof v === 'object' && v !== null && Vector4TypeId in v\n\n/** @internal */\nexport const equals = dual<\n (b: Vector4) => (a: Vector4) => boolean,\n (a: Vector4, b: Vector4) => boolean\n>(\n 2,\n (a: Vector4, b: Vector4) =>\n epsEquals(a.x, b.x) && epsEquals(a.y, b.y) && epsEquals(a.z, b.z) && epsEquals(a.w, b.w),\n)\n\n/** @internal */\nexport const make = (v0: number, v1 = v0, v2 = v1, v3 = v2): Vector4 =>\n new Vector4Impl(v0, v1, v2, v3)\n\n/** @internal */\nexport const fromTuple = (t: readonly [number, number, number, number]): Vector4 =>\n new Vector4Impl(t[0], t[1], t[2], t[3])\n\n/** @internal */\nexport const transpose = <T, const Channels extends ReadonlyArray<number>>(\n inputs: readonly [T, T, T, T],\n project: (item: T) => Channels,\n): { readonly [K in keyof Channels]: Vector4 } => {\n const a = project(inputs[0])\n const b = project(inputs[1])\n const c = project(inputs[2])\n const d = project(inputs[3])\n const result: Array<Vector4> = []\n for (let i = 0; i < a.length; i++) {\n result.push(make(a[i] as number, b[i] as number, c[i] as number, d[i] as number))\n }\n return result as never\n}\n\n/** @internal */\nexport const magnitude: (vector: Vector4) => number = (vector: Vector4) =>\n Math.hypot(vector.x, vector.y, vector.z, vector.w)\n\n/** @internal */\nexport const normalize: (vector: Vector4) => Vector4 = (vector: Vector4) => {\n const m = magnitude(vector)\n\n return make(vector.x / m, vector.y / m, vector.z / m, vector.w / m)\n}\n\n/** @internal */\nexport const dot = dual<(b: Vector4) => (a: Vector4) => number, (a: Vector4, b: Vector4) => number>(\n 2,\n (a: Vector4, b: Vector4) => a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w,\n)\n\n/** @internal */\nexport const components: (v: Vector4) => [number, number, number, number] = (v: Vector4) => [\n v.x,\n v.y,\n v.z,\n v.w,\n]\n\n/** @internal */\nexport const softmax: (v: Vector4) => Vector4 = (v: Vector4) => {\n const max = Math.max(v.x, v.y, v.z, v.w)\n\n const v0 = Math.exp(v.x - max)\n const v1 = Math.exp(v.y - max)\n const v2 = Math.exp(v.z - max)\n const v3 = Math.exp(v.w - max)\n\n const sum = v0 + v1 + v2 + v3\n\n return make(v0 / sum, v1 / sum, v2 / sum, v3 / sum)\n}\n\n/** @internal */\nexport const add = dual<\n (b: Vector4) => (a: Vector4) => Vector4,\n (a: Vector4, b: Vector4) => Vector4\n>(2, (a: Vector4, b: Vector4) => make(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w))\n\n/** @internal */\nexport const subtract = dual<\n (b: Vector4) => (a: Vector4) => Vector4,\n (a: Vector4, b: Vector4) => Vector4\n>(2, (a: Vector4, b: Vector4) => make(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w))\n\n/** @internal */\nexport const hadamard = dual<\n (b: Vector4) => (a: Vector4) => Vector4,\n (a: Vector4, b: Vector4) => Vector4\n>(2, (a: Vector4, b: Vector4) => make(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w))\n/** @internal */\nexport const scale = dual<\n (s: number) => (v: Vector4) => Vector4,\n (v: Vector4, s: number) => Vector4\n>(2, (v: Vector4, s: number) => (s === 1 ? v : make(v.x * s, v.y * s, v.z * s, v.w * s)))\n"],"mappings":";;;AAIA,MAAa,gBAA+B,OAAO,IAAI,gBAAgB;AAGvE,IAAM,cAAN,cAA0B,SAA4B;CACpD,CAAU,iBAAgC;CAE1C;CACA;CACA;CAEA,YAAY,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG;EAClC,OAAO;EACP,KAAK,IAAI;EACT,KAAK,IAAI;EACT,KAAK,IAAI;;CAGX,KAAK,KAAK;EACR,OAAO,KAAK;;CAGd,KAAK,KAAK;EACR,OAAO,KAAK;;CAGd,KAAK,KAAK;EACR,OAAO,KAAK;;CAGd,KAAK,OAAO,eAAe;EACzB,OAAO,WAAW,KAAK,EAAE,IAAI,KAAK,EAAE,IAAI,KAAK,EAAE;;CAGjD,KAAK,OAAO,IAAI,6BAA6B,IAAI;EAC/C,OAAO,KAAK,OAAO;;;;AAKvB,MAAa,aAAa,MACxB,OAAO,MAAM,YAAY,MAAM,QAAQ,iBAAi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