@lakuna/umath 2.0.0 → 3.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/LICENSE +1 -1
- package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
- package/dist/algorithms/greatestCommonDivisor.js +14 -4
- package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/linalg/DualQuaternion.d.ts +124 -124
- package/dist/linalg/DualQuaternion.d.ts.map +1 -1
- package/dist/linalg/DualQuaternion.js +173 -165
- package/dist/linalg/DualQuaternion.js.map +1 -1
- package/dist/linalg/Matrix.d.ts +24 -24
- package/dist/linalg/Matrix.d.ts.map +1 -1
- package/dist/linalg/Matrix2.d.ts +63 -63
- package/dist/linalg/Matrix2.d.ts.map +1 -1
- package/dist/linalg/Matrix2.js +92 -88
- package/dist/linalg/Matrix2.js.map +1 -1
- package/dist/linalg/Matrix3.d.ts +107 -107
- package/dist/linalg/Matrix3.d.ts.map +1 -1
- package/dist/linalg/Matrix3.js +147 -138
- package/dist/linalg/Matrix3.js.map +1 -1
- package/dist/linalg/Matrix4.d.ts +200 -201
- package/dist/linalg/Matrix4.d.ts.map +1 -1
- package/dist/linalg/Matrix4.js +272 -251
- package/dist/linalg/Matrix4.js.map +1 -1
- package/dist/linalg/Quaternion.d.ts +116 -116
- package/dist/linalg/Quaternion.d.ts.map +1 -1
- package/dist/linalg/Quaternion.js +175 -161
- package/dist/linalg/Quaternion.js.map +1 -1
- package/dist/linalg/SlowMatrix.d.ts +5 -5
- package/dist/linalg/SlowMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowMatrix.js +12 -12
- package/dist/linalg/SlowMatrix.js.map +1 -1
- package/dist/linalg/SlowSquareMatrix.d.ts +6 -6
- package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowSquareMatrix.js +15 -15
- package/dist/linalg/SlowSquareMatrix.js.map +1 -1
- package/dist/linalg/SlowVector.d.ts +70 -70
- package/dist/linalg/SlowVector.d.ts.map +1 -1
- package/dist/linalg/SlowVector.js +153 -153
- package/dist/linalg/SlowVector.js.map +1 -1
- package/dist/linalg/SquareMatrix.d.ts +8 -8
- package/dist/linalg/SquareMatrix.d.ts.map +1 -1
- package/dist/linalg/Vector.d.ts +85 -84
- package/dist/linalg/Vector.d.ts.map +1 -1
- package/dist/linalg/Vector2.d.ts +104 -104
- package/dist/linalg/Vector2.d.ts.map +1 -1
- package/dist/linalg/Vector2.js +145 -143
- package/dist/linalg/Vector2.js.map +1 -1
- package/dist/linalg/Vector3.d.ts +130 -130
- package/dist/linalg/Vector3.d.ts.map +1 -1
- package/dist/linalg/Vector3.js +176 -173
- package/dist/linalg/Vector3.js.map +1 -1
- package/dist/linalg/Vector4.d.ts +101 -101
- package/dist/linalg/Vector4.d.ts.map +1 -1
- package/dist/linalg/Vector4.js +144 -140
- package/dist/linalg/Vector4.js.map +1 -1
- package/dist/types/AxisAngle.d.ts +2 -2
- package/dist/types/AxisAngle.d.ts.map +1 -1
- package/dist/types/FieldOfView.d.ts +2 -2
- package/dist/types/FieldOfView.d.ts.map +1 -1
- package/dist/utility/BigNumber.d.ts +21 -11
- package/dist/utility/BigNumber.d.ts.map +1 -1
- package/dist/utility/BigNumber.js +42 -31
- package/dist/utility/BigNumber.js.map +1 -1
- package/dist/utility/createAxisAngleLike.d.ts.map +1 -1
- package/dist/utility/createAxisAngleLike.js.map +1 -1
- package/package.json +11 -9
- package/src/algorithms/greatestCommonDivisor.ts +19 -7
- package/src/index.ts +17 -13
- package/src/linalg/DualQuaternion.ts +208 -193
- package/src/linalg/Matrix.ts +28 -28
- package/src/linalg/Matrix2.ts +117 -108
- package/src/linalg/Matrix3.ts +177 -158
- package/src/linalg/Matrix4.ts +386 -348
- package/src/linalg/Quaternion.ts +207 -189
- package/src/linalg/SlowMatrix.ts +19 -18
- package/src/linalg/SlowSquareMatrix.ts +19 -18
- package/src/linalg/SlowVector.ts +170 -169
- package/src/linalg/SquareMatrix.ts +9 -9
- package/src/linalg/Vector.ts +91 -89
- package/src/linalg/Vector2.ts +160 -155
- package/src/linalg/Vector3.ts +206 -199
- package/src/linalg/Vector4.ts +165 -156
- package/src/types/AxisAngle.ts +3 -3
- package/src/types/FieldOfView.ts +3 -3
- package/src/utility/BigNumber.ts +63 -41
- package/src/utility/createAxisAngleLike.ts +1 -0
package/dist/linalg/Vector3.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { default as Vector, VectorLike } from "./Vector.js";
|
|
2
1
|
import type { Matrix3Like } from "./Matrix3.js";
|
|
3
2
|
import type { Matrix4Like } from "./Matrix4.js";
|
|
4
3
|
import type { QuaternionLike } from "./Quaternion.js";
|
|
4
|
+
import type { default as Vector, VectorLike } from "./Vector.js";
|
|
5
5
|
/**
|
|
6
6
|
* A quantity with magnitude and direction in three dimensions.
|
|
7
7
|
* @public
|
|
@@ -382,6 +382,23 @@ export declare const transformQuaternion: <T extends Vector3Like>(vector: Vector
|
|
|
382
382
|
* @public
|
|
383
383
|
*/
|
|
384
384
|
export default class Vector3 extends Float32Array implements Vector, Vector3Like {
|
|
385
|
+
/** The first component of this vector. */
|
|
386
|
+
0: number;
|
|
387
|
+
/** The second component of this vector. */
|
|
388
|
+
1: number;
|
|
389
|
+
/** The third component of this vector. */
|
|
390
|
+
2: number;
|
|
391
|
+
/** The magnitude (length) of this vector. */
|
|
392
|
+
get magnitude(): number;
|
|
393
|
+
set magnitude(value: number);
|
|
394
|
+
/** The squared magnitude (length) of this vector. */
|
|
395
|
+
get squaredMagnitude(): number;
|
|
396
|
+
set squaredMagnitude(value: number);
|
|
397
|
+
/**
|
|
398
|
+
* Create a three-dimensional zero vector.
|
|
399
|
+
* @see {@link https://en.wikipedia.org/wiki/Euclidean_vector | Euclidean vector}
|
|
400
|
+
*/
|
|
401
|
+
constructor();
|
|
385
402
|
/**
|
|
386
403
|
* Create a vector with the given values.
|
|
387
404
|
* @param x - The first component.
|
|
@@ -391,34 +408,37 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
391
408
|
*/
|
|
392
409
|
static fromValues(x: number, y: number, z: number): Vector3;
|
|
393
410
|
/**
|
|
394
|
-
*
|
|
395
|
-
* @
|
|
411
|
+
* Absolutize the components of this vector.
|
|
412
|
+
* @returns The absolutized vector.
|
|
396
413
|
*/
|
|
397
|
-
|
|
398
|
-
/** The first component of this vector. */
|
|
399
|
-
0: number;
|
|
400
|
-
/** The second component of this vector. */
|
|
401
|
-
1: number;
|
|
402
|
-
/** The third component of this vector. */
|
|
403
|
-
2: number;
|
|
414
|
+
abs(): Vector3;
|
|
404
415
|
/**
|
|
405
|
-
*
|
|
416
|
+
* Add two vectors of the same size.
|
|
406
417
|
* @param vector - The other vector.
|
|
407
|
-
* @returns
|
|
418
|
+
* @returns The sum of the vectors.
|
|
408
419
|
*/
|
|
409
|
-
|
|
420
|
+
add(vector: Vector3Like): Vector3;
|
|
410
421
|
/**
|
|
411
|
-
*
|
|
422
|
+
* Get the angle from this vector to another in radians.
|
|
412
423
|
* @param vector - The other vector.
|
|
413
|
-
* @returns
|
|
424
|
+
* @returns The angular distance from this vector to the other.
|
|
414
425
|
*/
|
|
415
|
-
|
|
426
|
+
angle(vector: Vector3Like): number;
|
|
416
427
|
/**
|
|
417
|
-
*
|
|
418
|
-
* @param
|
|
419
|
-
* @
|
|
428
|
+
* Perform a Bézier interpolation with two control points between this vector and another.
|
|
429
|
+
* @param a - The first control point.
|
|
430
|
+
* @param b - The second control point.
|
|
431
|
+
* @param end - The other vector.
|
|
432
|
+
* @param t - The interpolation amount in the range `[0,1]`.
|
|
433
|
+
* @returns The interpolated vector.
|
|
434
|
+
* @see {@link https://en.wikipedia.org/wiki/B%C3%A9zier_curve | Bézier curve}
|
|
420
435
|
*/
|
|
421
|
-
|
|
436
|
+
bezier(a: Vector3Like, b: Vector3Like, end: Vector3Like, t: number): Vector3;
|
|
437
|
+
/**
|
|
438
|
+
* Round up the components of this vector.
|
|
439
|
+
* @returns The rounded vector.
|
|
440
|
+
*/
|
|
441
|
+
ceil(): Vector3;
|
|
422
442
|
/**
|
|
423
443
|
* Copy the values from this vector to another one.
|
|
424
444
|
* @returns The copy.
|
|
@@ -431,11 +451,19 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
431
451
|
*/
|
|
432
452
|
copy(vector: Vector3Like): this;
|
|
433
453
|
/**
|
|
434
|
-
*
|
|
454
|
+
* Calculate the cross product of this and another vector.
|
|
435
455
|
* @param vector - The other vector.
|
|
436
|
-
* @returns The product
|
|
456
|
+
* @returns The cross product.
|
|
457
|
+
* @see {@link https://en.wikipedia.org/wiki/Cross_product | Cross product}
|
|
437
458
|
*/
|
|
438
|
-
|
|
459
|
+
cross(vector: Vector3Like): Vector3;
|
|
460
|
+
/**
|
|
461
|
+
* Calculate the Euclidean distance between this vector and another.
|
|
462
|
+
* @param vector - The other vector.
|
|
463
|
+
* @returns The distance.
|
|
464
|
+
* @see {@link https://en.wikipedia.org/wiki/Euclidean_distance | Euclidean distance}
|
|
465
|
+
*/
|
|
466
|
+
distance(vector: Vector3Like): number;
|
|
439
467
|
/**
|
|
440
468
|
* Divide this vector by another.
|
|
441
469
|
* @param vector - The other vector.
|
|
@@ -443,37 +471,52 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
443
471
|
*/
|
|
444
472
|
divide(vector: Vector3Like): Vector3;
|
|
445
473
|
/**
|
|
446
|
-
*
|
|
474
|
+
* Calculate the dot product of this and another vector.
|
|
447
475
|
* @param vector - The other vector.
|
|
448
|
-
* @returns The
|
|
476
|
+
* @returns The dot product.
|
|
477
|
+
* @see {@link https://en.wikipedia.org/wiki/Dot_product | Dot product}
|
|
449
478
|
*/
|
|
450
|
-
|
|
479
|
+
dot(vector: Vector3Like): number;
|
|
451
480
|
/**
|
|
452
|
-
*
|
|
453
|
-
* @
|
|
481
|
+
* Determine whether or not this vector is roughly equivalent to another.
|
|
482
|
+
* @param vector - The other vector.
|
|
483
|
+
* @returns Whether or not the vectors are equivalent.
|
|
454
484
|
*/
|
|
455
|
-
|
|
485
|
+
equals(vector: Vector3Like): boolean;
|
|
456
486
|
/**
|
|
457
|
-
*
|
|
458
|
-
* @
|
|
487
|
+
* Determine whether or not this vector is exactly equivalent to another.
|
|
488
|
+
* @param vector - The other vector.
|
|
489
|
+
* @returns Whether or not the vectors are equivalent.
|
|
459
490
|
*/
|
|
460
|
-
|
|
491
|
+
exactEquals(vector: Vector3Like): boolean;
|
|
461
492
|
/**
|
|
462
493
|
* Round down the components of this vector.
|
|
463
494
|
* @returns The rounded vector.
|
|
464
495
|
*/
|
|
465
496
|
floor(): Vector3;
|
|
466
497
|
/**
|
|
467
|
-
*
|
|
468
|
-
* @
|
|
498
|
+
* Perform a Hermite interpolation with two control points between this vector and another.
|
|
499
|
+
* @param a - The first control point.
|
|
500
|
+
* @param b - The second control point.
|
|
501
|
+
* @param end - The other vector.
|
|
502
|
+
* @param t - The interpolation amount in the range `[0,1]`.
|
|
503
|
+
* @returns The interpolated vector.
|
|
504
|
+
* @see {@link https://en.wikipedia.org/wiki/Hermite_interpolation | Hermite interpolation}
|
|
469
505
|
*/
|
|
470
|
-
|
|
506
|
+
hermite(a: Vector3Like, b: Vector3Like, end: Vector3Like, t: number): Vector3;
|
|
471
507
|
/**
|
|
472
|
-
*
|
|
508
|
+
* Calculate the multiplicative inverse of the components of this vector.
|
|
509
|
+
* @returns The inverted vector.
|
|
510
|
+
*/
|
|
511
|
+
invert(): Vector3;
|
|
512
|
+
/**
|
|
513
|
+
* Perform a linear interpolation between this and another vector.
|
|
473
514
|
* @param vector - The other vector.
|
|
474
|
-
* @
|
|
515
|
+
* @param t - The interpolation amount (in `[0,1]`).
|
|
516
|
+
* @returns The interpolated vector.
|
|
517
|
+
* @see {@link https://en.wikipedia.org/wiki/Linear_interpolation | Linear interpolation}
|
|
475
518
|
*/
|
|
476
|
-
|
|
519
|
+
lerp(vector: Vector3Like, t: number): Vector3;
|
|
477
520
|
/**
|
|
478
521
|
* Return the maximum of this and another vector.
|
|
479
522
|
* @param vector - The other vector.
|
|
@@ -481,54 +524,22 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
481
524
|
*/
|
|
482
525
|
max(vector: Vector3Like): Vector3;
|
|
483
526
|
/**
|
|
484
|
-
*
|
|
485
|
-
* @param scalar - The exponent (power) to raise each component to.
|
|
486
|
-
* @returns The power (result of the exponentiation).
|
|
487
|
-
*/
|
|
488
|
-
pow(scalar: number): Vector3;
|
|
489
|
-
/**
|
|
490
|
-
* Scale this vector by a scalar.
|
|
491
|
-
* @param scalar - The scalar.
|
|
492
|
-
* @returns The scaled vector.
|
|
493
|
-
*/
|
|
494
|
-
scale(scalar: number): Vector3;
|
|
495
|
-
/**
|
|
496
|
-
* Add another vector to this one after scaling the other by a scalar.
|
|
497
|
-
* @param vector - The other vector.
|
|
498
|
-
* @param scalar - The scalar.
|
|
499
|
-
* @returns The sum.
|
|
500
|
-
*/
|
|
501
|
-
scaleAndAdd(vector: Vector3Like, scalar: number): Vector3;
|
|
502
|
-
/**
|
|
503
|
-
* Calculate the Euclidean distance between this vector and another.
|
|
527
|
+
* Return the minimum of this and another vector.
|
|
504
528
|
* @param vector - The other vector.
|
|
505
|
-
* @returns The
|
|
506
|
-
* @see {@link https://en.wikipedia.org/wiki/Euclidean_distance | Euclidean distance}
|
|
529
|
+
* @returns The minimum.
|
|
507
530
|
*/
|
|
508
|
-
|
|
531
|
+
min(vector: Vector3Like): Vector3;
|
|
509
532
|
/**
|
|
510
|
-
*
|
|
533
|
+
* Multiply this vector by another.
|
|
511
534
|
* @param vector - The other vector.
|
|
512
|
-
* @returns The
|
|
513
|
-
* @see {@link https://en.wikipedia.org/wiki/Euclidean_distance | Euclidean distance}
|
|
535
|
+
* @returns The product of the vectors.
|
|
514
536
|
*/
|
|
515
|
-
|
|
516
|
-
/** The magnitude (length) of this vector. */
|
|
517
|
-
get magnitude(): number;
|
|
518
|
-
set magnitude(value: number);
|
|
519
|
-
/** The squared magnitude (length) of this vector. */
|
|
520
|
-
get squaredMagnitude(): number;
|
|
521
|
-
set squaredMagnitude(value: number);
|
|
537
|
+
multiply(vector: Vector3Like): Vector3;
|
|
522
538
|
/**
|
|
523
539
|
* Negate this vector.
|
|
524
540
|
* @returns The negated vector.
|
|
525
541
|
*/
|
|
526
542
|
negate(): Vector3;
|
|
527
|
-
/**
|
|
528
|
-
* Calculate the multiplicative inverse of the components of this vector.
|
|
529
|
-
* @returns The inverted vector.
|
|
530
|
-
*/
|
|
531
|
-
invert(): Vector3;
|
|
532
543
|
/**
|
|
533
544
|
* Normalize this vector.
|
|
534
545
|
* @returns The normalized vector.
|
|
@@ -536,45 +547,17 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
536
547
|
*/
|
|
537
548
|
normalize(): Vector3;
|
|
538
549
|
/**
|
|
539
|
-
*
|
|
540
|
-
* @param
|
|
541
|
-
* @returns The
|
|
542
|
-
* @see {@link https://en.wikipedia.org/wiki/Dot_product | Dot product}
|
|
543
|
-
*/
|
|
544
|
-
dot(vector: Vector3Like): number;
|
|
545
|
-
/**
|
|
546
|
-
* Calculate the cross product of this and another vector.
|
|
547
|
-
* @param vector - The other vector.
|
|
548
|
-
* @returns The cross product.
|
|
549
|
-
* @see {@link https://en.wikipedia.org/wiki/Cross_product | Cross product}
|
|
550
|
-
*/
|
|
551
|
-
cross(vector: Vector3Like): Vector3;
|
|
552
|
-
/**
|
|
553
|
-
* Perform a linear interpolation between this and another vector.
|
|
554
|
-
* @param vector - The other vector.
|
|
555
|
-
* @param t - The interpolation amount (in `[0,1]`).
|
|
556
|
-
* @returns The interpolated vector.
|
|
557
|
-
* @see {@link https://en.wikipedia.org/wiki/Linear_interpolation | Linear interpolation}
|
|
550
|
+
* Raise each component of this vector to the given power.
|
|
551
|
+
* @param scalar - The exponent (power) to raise each component to.
|
|
552
|
+
* @returns The power (result of the exponentiation).
|
|
558
553
|
*/
|
|
559
|
-
|
|
554
|
+
pow(scalar: number): Vector3;
|
|
560
555
|
/**
|
|
561
556
|
* Set this vector to a random value with the given magnitude.
|
|
562
557
|
* @param magnitude - The magnitude.
|
|
563
558
|
* @returns This vector.
|
|
564
559
|
*/
|
|
565
560
|
random(magnitude?: number): this;
|
|
566
|
-
/**
|
|
567
|
-
* Transform this vector by a three-by-three matrix.
|
|
568
|
-
* @param matrix - The matrix.
|
|
569
|
-
* @returns The transformed vector.
|
|
570
|
-
*/
|
|
571
|
-
transformMatrix3(matrix: Matrix3Like): Vector3;
|
|
572
|
-
/**
|
|
573
|
-
* Transform this vector by a four-by-four matrix.
|
|
574
|
-
* @param matrix - The matrix.
|
|
575
|
-
* @returns The transformed vector.
|
|
576
|
-
*/
|
|
577
|
-
transformMatrix4(matrix: Matrix4Like): Vector3;
|
|
578
561
|
/**
|
|
579
562
|
* Rotate this vector around the X-axis.
|
|
580
563
|
* @param origin - The origin of the rotation.
|
|
@@ -597,36 +580,48 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
597
580
|
*/
|
|
598
581
|
rotateZ(origin: Vector3Like, r: number): Vector3;
|
|
599
582
|
/**
|
|
600
|
-
*
|
|
583
|
+
* Round the components of this vector.
|
|
584
|
+
* @returns The rounded vector.
|
|
585
|
+
*/
|
|
586
|
+
round(): Vector3;
|
|
587
|
+
/**
|
|
588
|
+
* Scale this vector by a scalar.
|
|
589
|
+
* @param scalar - The scalar.
|
|
590
|
+
* @returns The scaled vector.
|
|
591
|
+
*/
|
|
592
|
+
scale(scalar: number): Vector3;
|
|
593
|
+
/**
|
|
594
|
+
* Add another vector to this one after scaling the other by a scalar.
|
|
601
595
|
* @param vector - The other vector.
|
|
602
|
-
* @
|
|
596
|
+
* @param scalar - The scalar.
|
|
597
|
+
* @returns The sum.
|
|
603
598
|
*/
|
|
604
|
-
|
|
599
|
+
scaleAndAdd(vector: Vector3Like, scalar: number): Vector3;
|
|
605
600
|
/**
|
|
606
|
-
*
|
|
607
|
-
* @
|
|
601
|
+
* Calculate the squared Euclidean distance between this vector and another.
|
|
602
|
+
* @param vector - The other vector.
|
|
603
|
+
* @returns The squared distance.
|
|
604
|
+
* @see {@link https://en.wikipedia.org/wiki/Euclidean_distance | Euclidean distance}
|
|
608
605
|
*/
|
|
609
|
-
|
|
606
|
+
squaredDistance(vector: Vector3Like): number;
|
|
610
607
|
/**
|
|
611
|
-
*
|
|
612
|
-
* @param
|
|
613
|
-
* @
|
|
614
|
-
* @param end - The other vector.
|
|
615
|
-
* @param t - The interpolation amount in the range `[0,1]`.
|
|
616
|
-
* @returns The interpolated vector.
|
|
617
|
-
* @see {@link https://en.wikipedia.org/wiki/Hermite_interpolation | Hermite interpolation}
|
|
608
|
+
* Subtract another vector from this one.
|
|
609
|
+
* @param vector - The other vector.
|
|
610
|
+
* @returns The difference between the vectors.
|
|
618
611
|
*/
|
|
619
|
-
|
|
612
|
+
subtract(vector: Vector3Like): Vector3;
|
|
620
613
|
/**
|
|
621
|
-
*
|
|
622
|
-
* @param
|
|
623
|
-
* @
|
|
624
|
-
* @param end - The other vector.
|
|
625
|
-
* @param t - The interpolation amount in the range `[0,1]`.
|
|
626
|
-
* @returns The interpolated vector.
|
|
627
|
-
* @see {@link https://en.wikipedia.org/wiki/B%C3%A9zier_curve | Bézier curve}
|
|
614
|
+
* Transform this vector by a three-by-three matrix.
|
|
615
|
+
* @param matrix - The matrix.
|
|
616
|
+
* @returns The transformed vector.
|
|
628
617
|
*/
|
|
629
|
-
|
|
618
|
+
transformMatrix3(matrix: Matrix3Like): Vector3;
|
|
619
|
+
/**
|
|
620
|
+
* Transform this vector by a four-by-four matrix.
|
|
621
|
+
* @param matrix - The matrix.
|
|
622
|
+
* @returns The transformed vector.
|
|
623
|
+
*/
|
|
624
|
+
transformMatrix4(matrix: Matrix4Like): Vector3;
|
|
630
625
|
/**
|
|
631
626
|
* Transform this vector by a quaternion.
|
|
632
627
|
* @param quaternion - The quaternion.
|
|
@@ -634,5 +629,10 @@ export default class Vector3 extends Float32Array implements Vector, Vector3Like
|
|
|
634
629
|
* @see {@link https://en.wikipedia.org/wiki/Quaternion | Quaternion}
|
|
635
630
|
*/
|
|
636
631
|
transformQuaternion(quaternion: QuaternionLike): Vector3;
|
|
632
|
+
/**
|
|
633
|
+
* Set this to the zero vector.
|
|
634
|
+
* @returns This vector.
|
|
635
|
+
*/
|
|
636
|
+
zero(): this;
|
|
637
637
|
}
|
|
638
638
|
//# sourceMappingURL=Vector3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../src/linalg/Vector3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../src/linalg/Vector3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,IAAI,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIjE;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C,0CAA0C;IAE1C,CAAC,EAAE,MAAM,CAAC;IAEV,2CAA2C;IAE3C,CAAC,EAAE,MAAM,CAAC;IAEV,0CAA0C;IAE1C,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,YAAY,GAAG,WAEF,CAAC;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,EAC/C,GAAG,MAAM,EACT,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,CAAC,K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