@lakuna/umath 1.3.4 → 1.3.6

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.
Files changed (162) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -9
  3. package/dist/algorithms/combinations.d.ts +7 -0
  4. package/dist/algorithms/combinations.d.ts.map +1 -1
  5. package/dist/algorithms/combinations.js +8 -1
  6. package/dist/algorithms/combinations.js.map +1 -1
  7. package/dist/algorithms/degreesToRadians.d.ts +7 -0
  8. package/dist/algorithms/degreesToRadians.d.ts.map +1 -1
  9. package/dist/algorithms/degreesToRadians.js +7 -0
  10. package/dist/algorithms/degreesToRadians.js.map +1 -1
  11. package/dist/algorithms/factorial.d.ts +6 -0
  12. package/dist/algorithms/factorial.d.ts.map +1 -1
  13. package/dist/algorithms/factorial.js +15 -5
  14. package/dist/algorithms/factorial.js.map +1 -1
  15. package/dist/algorithms/fibonacci.d.ts +6 -1
  16. package/dist/algorithms/fibonacci.d.ts.map +1 -1
  17. package/dist/algorithms/fibonacci.js +6 -1
  18. package/dist/algorithms/fibonacci.js.map +1 -1
  19. package/dist/algorithms/greatestCommonDivisor.d.ts +14 -0
  20. package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
  21. package/dist/algorithms/greatestCommonDivisor.js +7 -9
  22. package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
  23. package/dist/algorithms/hypergeometricPmf.d.ts +9 -0
  24. package/dist/algorithms/hypergeometricPmf.d.ts.map +1 -1
  25. package/dist/algorithms/hypergeometricPmf.js +10 -1
  26. package/dist/algorithms/hypergeometricPmf.js.map +1 -1
  27. package/dist/algorithms/isPrime.d.ts +6 -0
  28. package/dist/algorithms/isPrime.d.ts.map +1 -1
  29. package/dist/algorithms/isPrime.js +8 -1
  30. package/dist/algorithms/isPrime.js.map +1 -1
  31. package/dist/algorithms/permutations.d.ts +7 -0
  32. package/dist/algorithms/permutations.d.ts.map +1 -1
  33. package/dist/algorithms/permutations.js +8 -1
  34. package/dist/algorithms/permutations.js.map +1 -1
  35. package/dist/algorithms/primeFactorization.d.ts +7 -1
  36. package/dist/algorithms/primeFactorization.d.ts.map +1 -1
  37. package/dist/algorithms/primeFactorization.js +10 -3
  38. package/dist/algorithms/primeFactorization.js.map +1 -1
  39. package/dist/algorithms/radiansToDegrees.d.ts +7 -0
  40. package/dist/algorithms/radiansToDegrees.d.ts.map +1 -1
  41. package/dist/algorithms/radiansToDegrees.js +7 -0
  42. package/dist/algorithms/radiansToDegrees.js.map +1 -1
  43. package/dist/algorithms/summation.d.ts +8 -0
  44. package/dist/algorithms/summation.d.ts.map +1 -1
  45. package/dist/algorithms/summation.js +9 -0
  46. package/dist/algorithms/summation.js.map +1 -1
  47. package/dist/index.d.ts +32 -33
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +27 -27
  50. package/dist/index.js.map +1 -1
  51. package/dist/linalg/DualQuaternion.d.ts +460 -83
  52. package/dist/linalg/DualQuaternion.d.ts.map +1 -1
  53. package/dist/linalg/DualQuaternion.js +514 -133
  54. package/dist/linalg/DualQuaternion.js.map +1 -1
  55. package/dist/linalg/Matrix.d.ts +80 -12
  56. package/dist/linalg/Matrix.d.ts.map +1 -1
  57. package/dist/linalg/Matrix2.d.ts +337 -52
  58. package/dist/linalg/Matrix2.d.ts.map +1 -1
  59. package/dist/linalg/Matrix2.js +345 -61
  60. package/dist/linalg/Matrix2.js.map +1 -1
  61. package/dist/linalg/Matrix3.d.ts +470 -72
  62. package/dist/linalg/Matrix3.d.ts.map +1 -1
  63. package/dist/linalg/Matrix3.js +488 -94
  64. package/dist/linalg/Matrix3.js.map +1 -1
  65. package/dist/linalg/Matrix4.d.ts +842 -137
  66. package/dist/linalg/Matrix4.d.ts.map +1 -1
  67. package/dist/linalg/Matrix4.js +896 -175
  68. package/dist/linalg/Matrix4.js.map +1 -1
  69. package/dist/linalg/Quaternion.d.ts +395 -70
  70. package/dist/linalg/Quaternion.d.ts.map +1 -1
  71. package/dist/linalg/Quaternion.js +416 -70
  72. package/dist/linalg/Quaternion.js.map +1 -1
  73. package/dist/linalg/SlowMatrix.d.ts +79 -9
  74. package/dist/linalg/SlowMatrix.d.ts.map +1 -1
  75. package/dist/linalg/SlowMatrix.js +147 -27
  76. package/dist/linalg/SlowMatrix.js.map +1 -1
  77. package/dist/linalg/SlowSquareMatrix.d.ts +58 -3
  78. package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
  79. package/dist/linalg/SlowSquareMatrix.js +111 -21
  80. package/dist/linalg/SlowSquareMatrix.js.map +1 -1
  81. package/dist/linalg/SquareMatrix.d.ts +26 -3
  82. package/dist/linalg/SquareMatrix.d.ts.map +1 -1
  83. package/dist/linalg/Vector.d.ts +148 -24
  84. package/dist/linalg/Vector.d.ts.map +1 -1
  85. package/dist/linalg/Vector2.d.ts +484 -84
  86. package/dist/linalg/Vector2.d.ts.map +1 -1
  87. package/dist/linalg/Vector2.js +487 -71
  88. package/dist/linalg/Vector2.js.map +1 -1
  89. package/dist/linalg/Vector3.d.ts +582 -98
  90. package/dist/linalg/Vector3.d.ts.map +1 -1
  91. package/dist/linalg/Vector3.js +625 -134
  92. package/dist/linalg/Vector3.js.map +1 -1
  93. package/dist/linalg/Vector4.d.ts +450 -75
  94. package/dist/linalg/Vector4.d.ts.map +1 -1
  95. package/dist/linalg/Vector4.js +447 -62
  96. package/dist/linalg/Vector4.js.map +1 -1
  97. package/dist/types/AxisAngle.d.ts +4 -1
  98. package/dist/types/AxisAngle.d.ts.map +1 -1
  99. package/dist/types/FieldOfView.d.ts +5 -0
  100. package/dist/types/FieldOfView.d.ts.map +1 -1
  101. package/dist/utility/BigNumber.d.ts +41 -8
  102. package/dist/utility/BigNumber.d.ts.map +1 -1
  103. package/dist/utility/BigNumber.js +47 -5
  104. package/dist/utility/BigNumber.js.map +1 -1
  105. package/dist/utility/MagnitudeError.d.ts +5 -0
  106. package/dist/utility/MagnitudeError.d.ts.map +1 -1
  107. package/dist/utility/MagnitudeError.js +6 -1
  108. package/dist/utility/MagnitudeError.js.map +1 -1
  109. package/dist/utility/MatrixSizeError.d.ts +5 -0
  110. package/dist/utility/MatrixSizeError.d.ts.map +1 -1
  111. package/dist/utility/MatrixSizeError.js +5 -0
  112. package/dist/utility/MatrixSizeError.js.map +1 -1
  113. package/dist/utility/PartialMatrixError.d.ts +5 -0
  114. package/dist/utility/PartialMatrixError.d.ts.map +1 -1
  115. package/dist/utility/PartialMatrixError.js +5 -0
  116. package/dist/utility/PartialMatrixError.js.map +1 -1
  117. package/dist/utility/SingularMatrixError.d.ts +8 -0
  118. package/dist/utility/SingularMatrixError.d.ts.map +1 -1
  119. package/dist/utility/SingularMatrixError.js +8 -0
  120. package/dist/utility/SingularMatrixError.js.map +1 -1
  121. package/dist/utility/epsilon.d.ts +1 -0
  122. package/dist/utility/epsilon.d.ts.map +1 -1
  123. package/dist/utility/epsilon.js +1 -0
  124. package/dist/utility/epsilon.js.map +1 -1
  125. package/package.json +20 -51
  126. package/src/algorithms/combinations.ts +4 -4
  127. package/src/algorithms/degreesToRadians.ts +3 -3
  128. package/src/algorithms/factorial.ts +13 -8
  129. package/src/algorithms/fibonacci.ts +3 -3
  130. package/src/algorithms/greatestCommonDivisor.ts +15 -19
  131. package/src/algorithms/hypergeometricPmf.ts +5 -6
  132. package/src/algorithms/isPrime.ts +4 -4
  133. package/src/algorithms/permutations.ts +4 -4
  134. package/src/algorithms/primeFactorization.ts +9 -9
  135. package/src/algorithms/radiansToDegrees.ts +3 -3
  136. package/src/algorithms/summation.ts +5 -5
  137. package/src/index.ts +35 -33
  138. package/src/linalg/DualQuaternion.ts +558 -804
  139. package/src/linalg/Matrix.ts +35 -36
  140. package/src/linalg/Matrix2.ts +277 -413
  141. package/src/linalg/Matrix3.ts +532 -737
  142. package/src/linalg/Matrix4.ts +1078 -1604
  143. package/src/linalg/Quaternion.ts +415 -690
  144. package/src/linalg/SlowMatrix.ts +118 -69
  145. package/src/linalg/SlowSquareMatrix.ts +85 -56
  146. package/src/linalg/SquareMatrix.ts +7 -7
  147. package/src/linalg/Vector.ts +71 -70
  148. package/src/linalg/Vector2.ts +380 -576
  149. package/src/linalg/Vector3.ts +544 -840
  150. package/src/linalg/Vector4.ts +383 -549
  151. package/src/types/AxisAngle.ts +1 -1
  152. package/src/utility/BigNumber.ts +33 -42
  153. package/src/utility/MagnitudeError.ts +4 -4
  154. package/src/utility/MatrixSizeError.ts +2 -3
  155. package/src/utility/PartialMatrixError.ts +2 -3
  156. package/src/utility/SingularMatrixError.ts +2 -2
  157. package/src/utility/epsilon.ts +1 -4
  158. package/dist/types/IntegerRepresentation.d.ts +0 -2
  159. package/dist/types/IntegerRepresentation.d.ts.map +0 -1
  160. package/dist/types/IntegerRepresentation.js +0 -2
  161. package/dist/types/IntegerRepresentation.js.map +0 -1
  162. package/src/types/IntegerRepresentation.ts +0 -2
@@ -1,83 +1,408 @@
1
- import type { Matrix3Like } from "#Matrix3";
2
- import type { Vector3Like } from "#Vector3";
3
- import type AxisAngle from "#AxisAngle";
4
- export type QuaternionLike = Quaternion | [number, number, number, number];
5
- export declare function createQuaternionLike(): QuaternionLike;
6
- export declare function fromMatrix3<T extends QuaternionLike>(matrix: Matrix3Like, out: T): T;
7
- export declare function fromEuler<T extends QuaternionLike>(x: number, y: number, z: number, out: T): T;
8
- export declare function fromAxes<T extends QuaternionLike>(view: Vector3Like, right: Vector3Like, up: Vector3Like, out: T): T;
9
- export declare function identity<T extends QuaternionLike>(out: T): T;
10
- export declare function getAxisAngle<T extends AxisAngle>(quaternion: QuaternionLike, out: T): T;
11
- export declare function setAxisAngle<T extends QuaternionLike>(axisAngle: AxisAngle, out: T): T;
12
- export declare function getAngle(a: QuaternionLike, b: QuaternionLike): number;
13
- export declare function multiply<T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, out: T): T;
14
- export declare function rotateX<T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T): T;
15
- export declare function rotateY<T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T): T;
16
- export declare function rotateZ<T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T): T;
17
- export declare function calculateW<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
18
- export declare function exp<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
19
- export declare function ln<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
20
- export declare function pow<T extends QuaternionLike>(quaternion: QuaternionLike, scalar: number, out: T): T;
21
- export declare function slerp<T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, t: number, out: T): T;
22
- export declare function random<T extends QuaternionLike>(out: T): T;
23
- export declare function invert<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
24
- export declare function conjugate<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
25
- export declare function sqlerp<T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, c: QuaternionLike, d: QuaternionLike, t: number, out: T): T;
26
- export default class Quaternion extends Float32Array {
27
- static fromMatrix3(matrix: Matrix3Like): Quaternion;
28
- static fromMatrix3<T extends QuaternionLike>(matrix: Matrix3Like, out: T): T;
29
- static fromEuler(x: number, y: number, z: number): Quaternion;
30
- static fromEuler<T extends QuaternionLike>(x: number, y: number, z: number, out: T): T;
31
- static fromValues(x: number, y: number, z: number, w: number): Quaternion;
32
- static fromValues<T extends QuaternionLike>(x: number, y: number, z: number, w: number, out: T): T;
33
- static fromAxes(view: Vector3Like, right: Vector3Like, up: Vector3Like): Quaternion;
34
- static fromAxes<T extends QuaternionLike>(view: Vector3Like, right: Vector3Like, up: Vector3Like, out: T): T;
1
+ import { type Matrix3Like } from "./Matrix3.js";
2
+ import type AxisAngle from "../types/AxisAngle.js";
3
+ import type { Vector3Like } from "./Vector3.js";
4
+ /** A complex number that is commonly used to describe rotations. */
5
+ export interface QuaternionLike extends Record<number, number> {
6
+ /** The first component of this quaternion. */
7
+ 0: number;
8
+ /** The second component of this quaternion. */
9
+ 1: number;
10
+ /** The third component of this quaternion. */
11
+ 2: number;
12
+ /** The fourth component of this quaternion. */
13
+ 3: number;
14
+ }
15
+ /**
16
+ * Create a quaternion-like object.
17
+ * @returns A quaternion-like object.
18
+ */
19
+ export declare const createQuaternionLike: () => QuaternionLike;
20
+ /**
21
+ * Create a quaternion from a three-by-three rotation matrix.
22
+ * @param matrix - The matrix.
23
+ * @param out - The quaternion to store the result in.
24
+ * @returns The quaternion.
25
+ * @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
26
+ */
27
+ export declare const fromMatrix3: <T extends QuaternionLike>(matrix: Matrix3Like, out: T) => T;
28
+ /**
29
+ * Create a quaternion from equivalent X-Y-Z Tait-Bryan angles
30
+ * @param x - The X angle.
31
+ * @param y - The Y angle.
32
+ * @param z - The Z angle.
33
+ * @param out - The quaternion to store the result in.
34
+ * @returns The quaternion.
35
+ * @see [Euler angles](https://en.wikipedia.org/wiki/Euler_angles)
36
+ */
37
+ export declare const fromEuler: <T extends QuaternionLike>(x: number, y: number, z: number, out: T) => T;
38
+ /**
39
+ * Create a quaternion with values corresponding to the given orthonormal set of vectors.
40
+ * @param view - The vector representing the viewing direction.
41
+ * @param right - The vector representing the local "right" direction.
42
+ * @param up - The vector representing the local "up" direction.
43
+ * @param out - The quaternion to store the result in.
44
+ * @returns The quaternion.
45
+ */
46
+ export declare const fromAxes: <T extends QuaternionLike>(view: Vector3Like, right: Vector3Like, up: Vector3Like, out: T) => T;
47
+ /**
48
+ * Set a quaternion to the identity.
49
+ * @param out - The quaternion to store the result in.
50
+ * @returns This quaternion.
51
+ */
52
+ export declare const identity: <T extends QuaternionLike>(out: T) => T;
53
+ /**
54
+ * Calculate the axis and angle that represent a quaternion.
55
+ * @param quaternion - The quaternion.
56
+ * @param out - The axis and angle to store the result in.
57
+ * @returns The axis and angle.
58
+ */
59
+ export declare const getAxisAngle: <T extends AxisAngle>(quaternion: QuaternionLike, out: T) => T;
60
+ /**
61
+ * Set the axis and angle that represent a quaternion.
62
+ * @param axisAngle - The axis and angle.
63
+ * @param out - The quaternion to store the result in.
64
+ * @returns The quaternion.
65
+ */
66
+ export declare const setAxisAngle: <T extends QuaternionLike>(axisAngle: AxisAngle, out: T) => T;
67
+ /**
68
+ * Get the angular distance between two unit quaternions.
69
+ * @param a - The first unit quaternion.
70
+ * @param b - The second unit quaternion.
71
+ * @returns The angular distance in radians.
72
+ */
73
+ export declare const getAngle: (a: QuaternionLike, b: QuaternionLike) => number;
74
+ /**
75
+ * Multiply two quaternions.
76
+ * @param a - The multiplier.
77
+ * @param b - The multiplicand.
78
+ * @param out - The quaternion to store the result in.
79
+ * @returns The product.
80
+ */
81
+ export declare const multiply: <T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, out: T) => T;
82
+ /**
83
+ * Rotate a quaternion by the given angle around the X-axis.
84
+ * @param quaternion - The quaternion.
85
+ * @param radians - The angle in radians.
86
+ * @param out - The quaternion to store the result in.
87
+ * @returns The rotated quaternion.
88
+ */
89
+ export declare const rotateX: <T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T) => T;
90
+ /**
91
+ * Rotate a quaternion by the given angle around the Y-axis.
92
+ * @param quaternion - The quaternion.
93
+ * @param radians - The angle in radians.
94
+ * @param out - The quaternion to store the result in.
95
+ * @returns The rotated quaternion.
96
+ */
97
+ export declare const rotateY: <T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T) => T;
98
+ /**
99
+ * Rotate a quaternion by the given angle around the Z-axis.
100
+ * @param quaternion - The quaternion.
101
+ * @param radians - The angle in radians.
102
+ * @param out - The quaternion to store the result in.
103
+ * @returns The rotated quaternion.
104
+ */
105
+ export declare const rotateZ: <T extends QuaternionLike>(quaternion: QuaternionLike, radians: number, out: T) => T;
106
+ /**
107
+ * Calculate the fourth component of a unit quaternion from the first three, ignoring the existing fourth component.
108
+ * @param quaternion - The quaternion.
109
+ * @param out - The quaternion to store the result in.
110
+ * @returns The quaternion.
111
+ */
112
+ export declare const calculateW: <T extends QuaternionLike>(quaternion: QuaternionLike, out: T) => T;
113
+ /**
114
+ * Calculate the exponential of a unit quaternion.
115
+ * @param quaternion - The quaternion.
116
+ * @param out - The quaternion to store the result in.
117
+ * @returns The exponential.
118
+ */
119
+ export declare const exp: <T extends QuaternionLike>(quaternion: QuaternionLike, out: T) => T;
120
+ /**
121
+ * Calculate the natural logarithm of a unit quaternion.
122
+ * @param quaternion - The quaternion.
123
+ * @param out - The quaternion to store the result in.
124
+ * @returns The natural logarithm.
125
+ */
126
+ export declare const ln: <T extends QuaternionLike>(quaternion: QuaternionLike, out: T) => T;
127
+ /**
128
+ * Calculate a power of a unit quaternion.
129
+ * @param quaternion - The quaternion.
130
+ * @param scalar - The amount to scale the quaternion by.
131
+ * @param out - The quaternion to store the result in.
132
+ * @returns The power.
133
+ */
134
+ export declare const pow: <T extends QuaternionLike>(quaternion: QuaternionLike, scalar: number, out: T) => T;
135
+ /**
136
+ * Perform a spherical linear interpolation between two quaternions.
137
+ * @param a - The first quaternion.
138
+ * @param b - The second quaternion.
139
+ * @param t - The interpolation amount in `[0,1]`.
140
+ * @param out - The quaternion to store the result in.
141
+ * @returns The interpolated quaternion.
142
+ * @see [Slerp](https://en.wikipedia.org/wiki/Slerp)
143
+ */
144
+ export declare const slerp: <T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, t: number, out: T) => T;
145
+ /**
146
+ * Set a quaternion to a random unit quaternion.
147
+ * @param out - The quaternion to store the result in.
148
+ * @returns The quaternion.
149
+ */
150
+ export declare const random: <T extends QuaternionLike>(out: T) => T;
151
+ /**
152
+ * Calculate the inverse of a quaternion. If the quaternion is normalized, the conjugate is the same but faster to calculate.
153
+ * @param quaternion - The quaternion.
154
+ * @param out - The quaternion to store the result in.
155
+ * @returns The inverse.
156
+ */
157
+ export declare const invert: <T extends QuaternionLike>(quaternion: QuaternionLike, out: T) => T;
158
+ /**
159
+ * Calculate the conjugate of a quaternion. If the quaternion is normalized, this is the same as the inverse but faster to calculate.
160
+ * @param quaternion - The quaternion.
161
+ * @param out - The quaternion to store the result in.
162
+ * @returns The conjugate.
163
+ */
164
+ export declare const conjugate: <T extends QuaternionLike>(quaternion: QuaternionLike, out: T) => T;
165
+ /**
166
+ * Perform a spherical linear interpolation with two control points between two quaternions.
167
+ * @param a - The first quaternion.
168
+ * @param b - The first control point.
169
+ * @param c - The second control point.
170
+ * @param d - The second quaternion.
171
+ * @param t - The interpolation amount in `[0,1]`.
172
+ * @param out - The quaternion to store the result in.
173
+ * @returns The interpolated value.
174
+ * @see [Slerp](https://en.wikipedia.org/wiki/Slerp)
175
+ */
176
+ export declare const sqlerp: <T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, c: QuaternionLike, d: QuaternionLike, t: number, out: T) => T;
177
+ /**
178
+ * A complex number that is commonly used to describe rotations.
179
+ * @see [Quaternion](https://en.wikipedia.org/wiki/Quaternion)
180
+ */
181
+ export default class Quaternion extends Float32Array implements QuaternionLike {
182
+ /**
183
+ * Create a quaternion from a three-by-three rotation matrix.
184
+ * @param matrix - The matrix.
185
+ * @param out - The quaternion to store the result in.
186
+ * @returns The quaternion.
187
+ * @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
188
+ */
189
+ static fromMatrix3<T extends QuaternionLike>(matrix: Matrix3Like, out?: T): T;
190
+ /**
191
+ * Create a quaternion from equivalent x-y-z Tait-Bryan angles
192
+ * @param x - The x angle.
193
+ * @param y - The y angle.
194
+ * @param z - The z angle.
195
+ * @param out - The quaternion to store the result in.
196
+ * @returns The quaternion.
197
+ * @see [Euler angles](https://en.wikipedia.org/wiki/Euler_angles)
198
+ */
199
+ static fromEuler<T extends QuaternionLike>(x: number, y: number, z: number, out?: T): T;
200
+ /**
201
+ * Create a quaternion with the given values.
202
+ * @param x - The first component.
203
+ * @param y - The second component.
204
+ * @param z - The third component.
205
+ * @param w - The fourth component.
206
+ * @param out - The quaternion to store the result in.
207
+ * @returns A new quaternion.
208
+ */
209
+ static fromValues<T extends QuaternionLike>(x: number, y: number, z: number, w: number, out?: T): T;
210
+ /**
211
+ * Create a quaternion with values corresponding to the given orthonormal set of vectors.
212
+ * @param view - The vector representing the viewing direction.
213
+ * @param right - The vector representing the local "right" direction.
214
+ * @param up - The vector representing the local "up" direction.
215
+ * @param out - The quaternion to store the result in.
216
+ * @returns The quaternion.
217
+ */
218
+ static fromAxes<T extends QuaternionLike>(view: Vector3Like, right: Vector3Like, up: Vector3Like, out?: T): T;
219
+ /**
220
+ * Create an identity quaternion.
221
+ * @see [Quaternion](https://en.wikipedia.org/wiki/Quaternion)
222
+ */
35
223
  constructor();
224
+ /** The first component of this quaternion. */
225
+ 0: number;
226
+ /** The second component of this quaternion. */
227
+ 1: number;
228
+ /** The third component of this quaternion. */
229
+ 2: number;
230
+ /** The fourth component of this quaternion. */
231
+ 3: number;
232
+ /**
233
+ * Set this quaternion to the identity.
234
+ * @returns This quaternion.
235
+ */
36
236
  identity(): this;
37
- getAxisAngle(): AxisAngle;
38
- getAxisAngle<T extends AxisAngle>(out: T): T;
237
+ /**
238
+ * Get the axis and angle that represent this quaternion.
239
+ * @param out - The axis and angle to store the result in.
240
+ * @returns The axis and angle.
241
+ */
242
+ getAxisAngle<T extends AxisAngle>(out?: T): T;
243
+ /**
244
+ * Set the axis and angle that represent this quaternion.
245
+ * @param axisAngle - The axis and angle.
246
+ * @returns This quaternion.
247
+ */
39
248
  setAxisAngle(axisAngle: AxisAngle): this;
249
+ /**
250
+ * Get the angular distance between this unit quaternion and another.
251
+ * @param quaternion - The other unit quaternion.
252
+ * @returns The angular distance in radians.
253
+ */
40
254
  getAngle(quaternion: QuaternionLike): number;
41
- multiply(quaternion: QuaternionLike): Quaternion;
42
- multiply<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
43
- rotateX(radians: number): Quaternion;
44
- rotateX<T extends QuaternionLike>(radians: number, out: T): T;
45
- rotateY(radians: number): Quaternion;
46
- rotateY<T extends QuaternionLike>(radians: number, out: T): T;
47
- rotateZ(radians: number): Quaternion;
48
- rotateZ<T extends QuaternionLike>(radians: number, out: T): T;
49
- calculateW(): Quaternion;
50
- calculateW<T extends QuaternionLike>(out: T): T;
51
- exp(): Quaternion;
52
- exp<T extends QuaternionLike>(out: T): T;
53
- ln(): Quaternion;
54
- ln<T extends QuaternionLike>(out: T): T;
55
- pow(scalar: number): Quaternion;
56
- pow<T extends QuaternionLike>(scalar: number, out: T): T;
57
- slerp(quaternion: QuaternionLike, t: number): Quaternion;
58
- slerp<T extends QuaternionLike>(quaternion: QuaternionLike, t: number, out: T): T;
255
+ /**
256
+ * Multiply this and another quaternion.
257
+ * @param quaternion - The other quaternion.
258
+ * @param out - The quaternion to store the result in.
259
+ * @returns The product.
260
+ */
261
+ multiply<T extends QuaternionLike>(quaternion: QuaternionLike, out?: T): T;
262
+ /**
263
+ * Rotate this quaternion by the given angle around the X-axis.
264
+ * @param r - The angle in radians.
265
+ * @param out - The quaternion to store the result in.
266
+ * @returns The rotated quaternion.
267
+ */
268
+ rotateX<T extends QuaternionLike>(r: number, out?: T): T;
269
+ /**
270
+ * Rotate this quaternion by the given angle around the Y-axis.
271
+ * @param r - The angle in radians.
272
+ * @param out - The quaternion to store the result in.
273
+ * @returns The rotated quaternion.
274
+ */
275
+ rotateY<T extends QuaternionLike>(r: number, out?: T): T;
276
+ /**
277
+ * Rotate this quaternion by the given angle around the Z-axis.
278
+ * @param r - The angle in radians.
279
+ * @param out - The quaternion to store the result in.
280
+ * @returns The rotated quaternion.
281
+ */
282
+ rotateZ<T extends QuaternionLike>(r: number, out?: T): T;
283
+ /**
284
+ * Calculate the fourth component of this unit quaternion from the first three, ignoring the existing fourth component.
285
+ * @param out - The quaternion to store the result in.
286
+ * @returns The quaternion.
287
+ */
288
+ calculateW<T extends QuaternionLike>(out?: T): T;
289
+ /**
290
+ * Calculate the exponential of this unit quaternion.
291
+ * @param out - The quaternion to store the result in.
292
+ * @returns The exponential.
293
+ */
294
+ exp<T extends QuaternionLike>(out?: T): T;
295
+ /**
296
+ * Calculate the natural logarithm of this unit quaternion.
297
+ * @param out - The quaternion to store the result in.
298
+ * @returns The natural logarithm.
299
+ */
300
+ ln<T extends QuaternionLike>(out?: T): T;
301
+ /**
302
+ * Calculate a power of this unit quaternion.
303
+ * @param scalar - The amount to scale the quaternion by.
304
+ * @param out - The quaternion to store the result in.
305
+ * @returns The power.
306
+ */
307
+ pow<T extends QuaternionLike>(scalar: number, out?: T): T;
308
+ /**
309
+ * Perform a spherical linear interpolation between this and another quaternion.
310
+ * @param quaternion - The other quaternion.
311
+ * @param t - The interpolation amount in `[0,1]`.
312
+ * @param out - The quaternion to store the result in.
313
+ * @returns The interpolated quaternion.
314
+ * @see [Slerp](https://en.wikipedia.org/wiki/Slerp)
315
+ */
316
+ slerp<T extends QuaternionLike>(quaternion: QuaternionLike, t: number, out?: T): T;
317
+ /**
318
+ * Set this to a random unit quaternion.
319
+ * @returns A random unit quaternion.
320
+ */
59
321
  random(): this;
60
- invert(): Quaternion;
61
- invert<T extends QuaternionLike>(out: T): T;
62
- conjugate(): Quaternion;
63
- conjugate<T extends QuaternionLike>(out: T): T;
64
- clone(): Quaternion;
65
- clone<T extends QuaternionLike>(out: T): T;
322
+ /**
323
+ * Calculate the inverse of this quaternion. If the quaternion is normalized, the conjugate is the same but faster to calculate.
324
+ * @param out - The quaternion to store the result in.
325
+ * @returns The inverse.
326
+ */
327
+ invert<T extends QuaternionLike>(out?: T): T;
328
+ /**
329
+ * Calculate the conjugate of this quaternion. If the quaternion is normalized, this is the same as the inverse but faster to calculate.
330
+ * @param out - The quaternion to store the result in.
331
+ * @returns The conjugate.
332
+ */
333
+ conjugate<T extends QuaternionLike>(out?: T): T;
334
+ /**
335
+ * Copy the values from this quaternion to another one.
336
+ * @param out - The quaternion to store the result in.
337
+ * @returns The copy.
338
+ */
339
+ clone<T extends QuaternionLike>(out?: T): T;
340
+ /**
341
+ * Copy the values of another quaternion into this one.
342
+ * @param quaternion - The quaternion to copy.
343
+ * @returns This quaternion.
344
+ */
66
345
  copy(quaternion: QuaternionLike): this;
67
- add(quaternion: QuaternionLike): Quaternion;
68
- add<T extends QuaternionLike>(quaternion: QuaternionLike, out: T): T;
69
- scale(scalar: number): Quaternion;
70
- scale<T extends QuaternionLike>(scalar: number, out: T): T;
346
+ /**
347
+ * Add two quaternions of the same size.
348
+ * @param quaternion - The other quaternion.
349
+ * @param out - The quaternion to store the result in.
350
+ * @returns The sum of the quaternions.
351
+ */
352
+ add<T extends QuaternionLike>(quaternion: QuaternionLike, out?: T): T;
353
+ /**
354
+ * Scale this quaternion by a scalar.
355
+ * @param scalar - The scalar.
356
+ * @param out - The quaternion to store the result in.
357
+ * @returns The scaled quaternion.
358
+ */
359
+ scale<T extends QuaternionLike>(scalar: number, out?: T): T;
360
+ /**
361
+ * Calculate the dot product of this and another quaternion.
362
+ * @param quaternion - The other quaternion.
363
+ * @returns The dot product.
364
+ */
71
365
  dot(quaternion: QuaternionLike): number;
72
- lerp(quaternion: QuaternionLike, t: number): Quaternion;
73
- lerp<T extends QuaternionLike>(quaternion: QuaternionLike, t: number, out: T): T;
366
+ /**
367
+ * Perform a linear interpolation between this and another quaternion.
368
+ * @param quaternion - The other quaternion.
369
+ * @param t - The interpolation amount (in `[0,1]`).
370
+ * @param out - The quaternion to store the result in.
371
+ * @returns The interpolated quaternion.
372
+ */
373
+ lerp<T extends QuaternionLike>(quaternion: QuaternionLike, t: number, out?: T): T;
374
+ /** Get the magnitude (length) of this quaternion. */
74
375
  get magnitude(): number;
376
+ /** Get the squared magnitude (length) of this quaternion. */
75
377
  get squaredMagnitude(): number;
76
- normalize(): Quaternion;
77
- normalize<T extends QuaternionLike>(out: T): T;
378
+ /**
379
+ * Normalize this quaternion.
380
+ * @param out - The quaternion to store the result in.
381
+ * @returns The normalized quaternion.
382
+ */
383
+ normalize<T extends QuaternionLike>(out?: T): T;
384
+ /**
385
+ * Determine whether or not this quaternion is roughly equivalent to another.
386
+ * @param quaternion - The other quaternion.
387
+ * @returns Whether or not the quaternions are equivalent.
388
+ */
78
389
  equals(quaternion: QuaternionLike): boolean;
390
+ /**
391
+ * Determine whether or not this quaternion is exactly equivalent to another.
392
+ * @param quaternion - The other quaternion.
393
+ * @returns Whether or not the quaternions are equivalent.
394
+ */
79
395
  exactEquals(quaternion: QuaternionLike): boolean;
80
- sqlerp(a: QuaternionLike, b: QuaternionLike, quaternion: QuaternionLike, t: number): Quaternion;
81
- sqlerp<T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, quaternion: QuaternionLike, t: number, out: T): T;
396
+ /**
397
+ * Perform a spherical linear interpolation with two control points between this and another quaternion.
398
+ * @param a - The first control point.
399
+ * @param b - The second control point.
400
+ * @param quaternion - The other quaternion.
401
+ * @param t - The interpolation amount in `[0,1]`.
402
+ * @param out - The quaternion to store the result in.
403
+ * @returns The interpolated value.
404
+ * @see [Slerp](https://en.wikipedia.org/wiki/Slerp)
405
+ */
406
+ sqlerp<T extends QuaternionLike>(a: QuaternionLike, b: QuaternionLike, quaternion: QuaternionLike, t: number, out?: T): T;
82
407
  }
83
408
  //# sourceMappingURL=Quaternion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Quaternion.d.ts","sourceRoot":"","sources":["../../src/linalg/Quaternion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAe5C,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAM3E,wBAAgB,oBAAoB,IAAI,cAAc,CAErD;AASD,wBAAgB,WAAW,CAAC,CAAC,SAAS,cAAc,EACnD,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,CAAC,GACJ,CAAC,CAqCH;AAWD,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EACjD,CAAC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