@oliversalzburg/js-utils 0.0.17 → 0.0.19-dev.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.
Files changed (239) hide show
  1. package/array.d.ts +39 -0
  2. package/{lib/array.js → array.js} +12 -13
  3. package/array.js.map +1 -0
  4. package/async.d.ts +28 -0
  5. package/{lib/async.js → async.js} +16 -10
  6. package/async.js.map +1 -0
  7. package/async.test.js +28 -0
  8. package/async.test.js.map +1 -0
  9. package/core.d.ts +36 -0
  10. package/core.js +3 -0
  11. package/core.js.map +1 -0
  12. package/{lib/dom → dom}/core.d.ts +8 -8
  13. package/{lib/dom → dom}/core.js +8 -8
  14. package/{lib/error-serializer.d.ts → error-serializer.d.ts} +5 -5
  15. package/{lib/error-serializer.js → error-serializer.js} +5 -5
  16. package/{lib/errors → errors}/AbstractError.d.ts +5 -5
  17. package/{lib/errors → errors}/AbstractError.js +5 -5
  18. package/{lib/errors → errors}/InternalError.d.ts +3 -3
  19. package/{lib/errors → errors}/InternalError.js +3 -3
  20. package/{lib/errors → errors}/InvalidArgumentError.d.ts +2 -2
  21. package/{lib/errors → errors}/InvalidArgumentError.js +2 -2
  22. package/{lib/errors → errors}/InvalidOperationError.d.ts +2 -2
  23. package/{lib/errors → errors}/InvalidOperationError.js +2 -2
  24. package/{lib/errors → errors}/NotImplementedError.d.ts +2 -2
  25. package/{lib/errors → errors}/NotImplementedError.js +2 -2
  26. package/{lib/errors → errors}/PermissionViolationError.d.ts +2 -2
  27. package/{lib/errors → errors}/PermissionViolationError.js +2 -2
  28. package/{lib/errors → errors}/ResourceConflictError.d.ts +2 -2
  29. package/{lib/errors → errors}/ResourceConflictError.js +2 -2
  30. package/{lib/errors → errors}/UnknownError.d.ts +2 -2
  31. package/{lib/errors → errors}/UnknownError.js +2 -2
  32. package/{lib/graphics → graphics}/canvas-sandbox.d.ts +13 -13
  33. package/{lib/graphics → graphics}/canvas-sandbox.js +9 -9
  34. package/{lib/graphics → graphics}/canvas.d.ts +30 -30
  35. package/{lib/graphics → graphics}/canvas.js +30 -30
  36. package/{lib/graphics → graphics}/core.d.ts +23 -23
  37. package/{lib/graphics → graphics}/core.js +23 -24
  38. package/{lib/graphics → graphics}/core.js.map +1 -1
  39. package/{lib/graphics → graphics}/render-loop.d.ts +3 -3
  40. package/{lib/graphics → graphics}/render-loop.js +3 -3
  41. package/{lib/math → math}/core.d.ts +19 -10
  42. package/{lib/math → math}/core.js +21 -10
  43. package/{lib/math → math}/core.js.map +1 -1
  44. package/{lib/math → math}/euler.d.ts +4 -4
  45. package/{lib/math → math}/euler.js +4 -4
  46. package/{lib/math → math}/matrix3.d.ts +34 -34
  47. package/{lib/math → math}/matrix3.js +34 -34
  48. package/{lib/math → math}/quaternion.d.ts +25 -25
  49. package/{lib/math → math}/quaternion.js +25 -25
  50. package/{lib/math → math}/transformation.d.ts +3 -3
  51. package/{lib/math → math}/transformation.js +3 -3
  52. package/{lib/math → math}/vector2.d.ts +40 -40
  53. package/{lib/math → math}/vector2.js +40 -40
  54. package/{lib/math → math}/vector3.d.ts +66 -66
  55. package/{lib/math → math}/vector3.js +66 -66
  56. package/{lib/math → math}/vector4.d.ts +38 -38
  57. package/{lib/math → math}/vector4.js +38 -38
  58. package/{lib/nil.d.ts → nil.d.ts} +15 -8
  59. package/{lib/nil.js → nil.js} +18 -8
  60. package/{lib/nil.js.map → nil.js.map} +1 -1
  61. package/package.json +21 -22
  62. package/{lib/random.d.ts → random.d.ts} +11 -17
  63. package/{lib/random.js → random.js} +11 -17
  64. package/random.js.map +1 -0
  65. package/{lib/sleep.d.ts → sleep.d.ts} +1 -1
  66. package/{lib/sleep.js → sleep.js} +1 -1
  67. package/{lib/string-formatter.d.ts → string-formatter.d.ts} +8 -4
  68. package/{lib/string-formatter.js → string-formatter.js} +8 -4
  69. package/string-formatter.js.map +1 -0
  70. package/string-formatter.test.d.ts +1 -0
  71. package/tsconfig.tsbuildinfo +1 -0
  72. package/LICENSES.md +0 -17
  73. package/_site/assets/highlight.css +0 -141
  74. package/_site/assets/main.js +0 -59
  75. package/_site/assets/navigation.js +0 -1
  76. package/_site/assets/search.js +0 -1
  77. package/_site/assets/style.css +0 -1383
  78. package/_site/classes/AbstractError.html +0 -67
  79. package/_site/classes/Canvas.html +0 -106
  80. package/_site/classes/CanvasSandbox.html +0 -91
  81. package/_site/classes/Euler.html +0 -217
  82. package/_site/classes/InternalError.html +0 -71
  83. package/_site/classes/InvalidArgumentError.html +0 -67
  84. package/_site/classes/InvalidOperationError.html +0 -67
  85. package/_site/classes/Matrix3.html +0 -167
  86. package/_site/classes/NotImplementedError.html +0 -66
  87. package/_site/classes/PermissionViolationError.html +0 -67
  88. package/_site/classes/Quaternion.html +0 -211
  89. package/_site/classes/Random.html +0 -90
  90. package/_site/classes/RenderLoop.html +0 -85
  91. package/_site/classes/ResourceConflictError.html +0 -66
  92. package/_site/classes/Transformation.html +0 -52
  93. package/_site/classes/UnexpectedNilError.html +0 -54
  94. package/_site/classes/UnknownError.html +0 -70
  95. package/_site/classes/Vector2.html +0 -159
  96. package/_site/classes/Vector3.html +0 -214
  97. package/_site/classes/Vector4.html +0 -156
  98. package/_site/functions/addVector2.html +0 -44
  99. package/_site/functions/addVector3.html +0 -44
  100. package/_site/functions/blend.html +0 -47
  101. package/_site/functions/blendAdditive.html +0 -47
  102. package/_site/functions/blendSubtractive.html +0 -47
  103. package/_site/functions/clamp.html +0 -45
  104. package/_site/functions/coalesceOnRejection.html +0 -51
  105. package/_site/functions/cosDeg.html +0 -43
  106. package/_site/functions/crossVector3.html +0 -44
  107. package/_site/functions/deg2rad.html +0 -43
  108. package/_site/functions/difference.html +0 -46
  109. package/_site/functions/distance.html +0 -46
  110. package/_site/functions/dotVector3.html +0 -44
  111. package/_site/functions/errorToJSON.html +0 -43
  112. package/_site/functions/errorToRecord.html +0 -43
  113. package/_site/functions/errorToSimpleSerializable.html +0 -43
  114. package/_site/functions/filterType.html +0 -46
  115. package/_site/functions/formatString.html +0 -46
  116. package/_site/functions/formatStringTemplate.html +0 -46
  117. package/_site/functions/fromRGB.html +0 -46
  118. package/_site/functions/fromRGBA.html +0 -46
  119. package/_site/functions/getA.html +0 -43
  120. package/_site/functions/getB.html +0 -43
  121. package/_site/functions/getDocumentElementTypeById.html +0 -46
  122. package/_site/functions/getDocumentElementTypeByIdStrict.html +0 -48
  123. package/_site/functions/getG.html +0 -43
  124. package/_site/functions/getR.html +0 -43
  125. package/_site/functions/intersect.html +0 -47
  126. package/_site/functions/is.html +0 -46
  127. package/_site/functions/isError.html +0 -43
  128. package/_site/functions/isInteger.html +0 -43
  129. package/_site/functions/isNil.html +0 -44
  130. package/_site/functions/isqrt.html +0 -43
  131. package/_site/functions/multiplyVector2.html +0 -44
  132. package/_site/functions/multiplyVector3.html +0 -44
  133. package/_site/functions/mustExist.html +0 -45
  134. package/_site/functions/nextPalette.html +0 -42
  135. package/_site/functions/prepareAsyncContext.html +0 -46
  136. package/_site/functions/putPixel32.html +0 -53
  137. package/_site/functions/putPixel32Add.html +0 -53
  138. package/_site/functions/putPixel32Sub.html +0 -53
  139. package/_site/functions/putSubPixel32.html +0 -47
  140. package/_site/functions/rad2deg.html +0 -43
  141. package/_site/functions/randomRange.html +0 -45
  142. package/_site/functions/safeRGBComponent.html +0 -43
  143. package/_site/functions/seedFromString.html +0 -44
  144. package/_site/functions/shuffleArray.html +0 -44
  145. package/_site/functions/sinDeg.html +0 -43
  146. package/_site/functions/sleep.html +0 -43
  147. package/_site/functions/somecolor.html +0 -43
  148. package/_site/functions/subtractVector2.html +0 -44
  149. package/_site/functions/subtractVector3.html +0 -44
  150. package/_site/functions/toGrayScale.html +0 -43
  151. package/_site/functions/unknownToError.html +0 -45
  152. package/_site/index.html +0 -44
  153. package/_site/interfaces/CanvasOptions.html +0 -44
  154. package/_site/interfaces/CanvasSandboxApplication.html +0 -60
  155. package/_site/interfaces/CanvasSandboxExpectedOptions.html +0 -48
  156. package/_site/interfaces/CanvasSandboxOptions.html +0 -45
  157. package/_site/interfaces/RenderLoopOptions.html +0 -46
  158. package/_site/modules.html +0 -134
  159. package/_site/types/AnyAsyncFunction.html +0 -41
  160. package/_site/types/AnyConstructor.html +0 -41
  161. package/_site/types/AnyFunction.html +0 -41
  162. package/_site/types/ConstructorOf.html +0 -41
  163. package/_site/types/FunctionReturning.html +0 -41
  164. package/_site/types/Maybe.html +0 -41
  165. package/_site/types/Mixin.html +0 -42
  166. package/_site/types/Nil.html +0 -42
  167. package/_site/types/RenderLoopCallback.html +0 -41
  168. package/_site/types/SerializedError.html +0 -41
  169. package/_site/variables/CANVAS_SANDBOX_DEFAULT_CSS.html +0 -41
  170. package/_site/variables/MS_PER_FRAME_60FPS.html +0 -42
  171. package/_site/variables/PALETTES.html +0 -41
  172. package/_site/variables/TWO_PI.html +0 -41
  173. package/_site/variables/random-1.html +0 -41
  174. package/coverage/base.css +0 -224
  175. package/coverage/block-navigation.js +0 -87
  176. package/coverage/bundle.js +0 -30
  177. package/coverage/favicon.png +0 -0
  178. package/coverage/index.html +0 -16
  179. package/coverage/prettify.css +0 -1
  180. package/coverage/prettify.js +0 -2
  181. package/coverage/sort-arrow-sprite.png +0 -0
  182. package/coverage/sorter.js +0 -196
  183. package/coverage/spa.css +0 -298
  184. package/coverage/string-formatter.ts.html +0 -187
  185. package/coverage/tmp/coverage-4186-1699218521999-0.json +0 -1
  186. package/coverage/tmp/coverage-4196-1699218521967-0.json +0 -1
  187. package/docs/assets/favicon.ico +0 -0
  188. package/lib/array.d.ts +0 -40
  189. package/lib/array.js.map +0 -1
  190. package/lib/async.d.ts +0 -27
  191. package/lib/async.js.map +0 -1
  192. package/lib/core.d.ts +0 -33
  193. package/lib/core.js +0 -12
  194. package/lib/core.js.map +0 -1
  195. package/lib/random.js.map +0 -1
  196. package/lib/string-formatter.js.map +0 -1
  197. package/mkdocs.yml +0 -52
  198. /package/{lib/error-serializer.test.d.ts → async.test.d.ts} +0 -0
  199. /package/{lib/dom → dom}/core.js.map +0 -0
  200. /package/{lib/dom → dom}/index.d.ts +0 -0
  201. /package/{lib/dom → dom}/index.js +0 -0
  202. /package/{lib/dom → dom}/index.js.map +0 -0
  203. /package/{lib/error-serializer.js.map → error-serializer.js.map} +0 -0
  204. /package/{lib/string-formatter.test.d.ts → error-serializer.test.d.ts} +0 -0
  205. /package/{lib/error-serializer.test.js → error-serializer.test.js} +0 -0
  206. /package/{lib/error-serializer.test.js.map → error-serializer.test.js.map} +0 -0
  207. /package/{lib/errors → errors}/AbstractError.js.map +0 -0
  208. /package/{lib/errors → errors}/InternalError.js.map +0 -0
  209. /package/{lib/errors → errors}/InvalidArgumentError.js.map +0 -0
  210. /package/{lib/errors → errors}/InvalidOperationError.js.map +0 -0
  211. /package/{lib/errors → errors}/NotImplementedError.js.map +0 -0
  212. /package/{lib/errors → errors}/PermissionViolationError.js.map +0 -0
  213. /package/{lib/errors → errors}/ResourceConflictError.js.map +0 -0
  214. /package/{lib/errors → errors}/UnknownError.js.map +0 -0
  215. /package/{lib/errors → errors}/index.d.ts +0 -0
  216. /package/{lib/errors → errors}/index.js +0 -0
  217. /package/{lib/errors → errors}/index.js.map +0 -0
  218. /package/{lib/graphics → graphics}/canvas-sandbox.js.map +0 -0
  219. /package/{lib/graphics → graphics}/canvas.js.map +0 -0
  220. /package/{lib/graphics → graphics}/index.d.ts +0 -0
  221. /package/{lib/graphics → graphics}/index.js +0 -0
  222. /package/{lib/graphics → graphics}/index.js.map +0 -0
  223. /package/{lib/graphics → graphics}/render-loop.js.map +0 -0
  224. /package/{lib/index.d.ts → index.d.ts} +0 -0
  225. /package/{lib/index.js → index.js} +0 -0
  226. /package/{lib/index.js.map → index.js.map} +0 -0
  227. /package/{lib/math → math}/euler.js.map +0 -0
  228. /package/{lib/math → math}/index.d.ts +0 -0
  229. /package/{lib/math → math}/index.js +0 -0
  230. /package/{lib/math → math}/index.js.map +0 -0
  231. /package/{lib/math → math}/matrix3.js.map +0 -0
  232. /package/{lib/math → math}/quaternion.js.map +0 -0
  233. /package/{lib/math → math}/transformation.js.map +0 -0
  234. /package/{lib/math → math}/vector2.js.map +0 -0
  235. /package/{lib/math → math}/vector3.js.map +0 -0
  236. /package/{lib/math → math}/vector4.js.map +0 -0
  237. /package/{lib/sleep.js.map → sleep.js.map} +0 -0
  238. /package/{lib/string-formatter.test.js → string-formatter.test.js} +0 -0
  239. /package/{lib/string-formatter.test.js.map → string-formatter.test.js.map} +0 -0
@@ -13,105 +13,105 @@ export declare class Vector2 {
13
13
  y: number;
14
14
  /**
15
15
  * Constructs a new {@linkcode Vector2}.
16
- * @param x The X component.
17
- * @param y The Y component.
16
+ * @param x - The X component.
17
+ * @param y - The Y component.
18
18
  */
19
19
  constructor(x: number, y: number);
20
20
  /**
21
21
  * Creates a copy of another {@linkcode Vector2}.
22
- * @param vector The vector to copy.
22
+ * @param vector - The vector to copy.
23
23
  * @returns A new vector.
24
24
  */
25
25
  static fromVector2(vector: Readonly<Vector2>): Vector2;
26
26
  /**
27
27
  * Sets the vector to new coordinates.
28
- * @param vector The coordinates to set the vector to.
28
+ * @param vector - The coordinates to set the vector to.
29
29
  * @returns This instance.
30
30
  */
31
31
  set(vector: Readonly<Vector2>): this;
32
32
  /**
33
33
  * Sets the vector to new coordinates.
34
- * @param x The new X component for the vector.
35
- * @param y The new Y component for the vector.
34
+ * @param x - The new X component for the vector.
35
+ * @param y - The new Y component for the vector.
36
36
  * @returns This instance.
37
37
  */
38
38
  setXY(x: number, y: number): this;
39
39
  /**
40
40
  * Adds another vector to this vector.
41
- * @param vector The vector to add to this vector.
41
+ * @param vector - The vector to add to this vector.
42
42
  * @returns This instance.
43
43
  */
44
44
  add(vector: Readonly<Vector2>): this;
45
45
  /**
46
46
  * Adds another vector to this vector.
47
- * @param x The value to add to the X component.
48
- * @param y The value to add to the Y component.
47
+ * @param x - The value to add to the X component.
48
+ * @param y - The value to add to the Y component.
49
49
  * @returns This instance.
50
50
  */
51
51
  addXY(x: number, y: number): this;
52
52
  /**
53
53
  * Scales another vector and adds it to this vector.
54
- * @param vector The vector to add to this vector.
55
- * @param scale The scaling to apply to the input vector.
54
+ * @param vector - The vector to add to this vector.
55
+ * @param scale - The scaling to apply to the input vector.
56
56
  * @returns This instance.
57
57
  */
58
58
  addMultiply(vector: Readonly<Vector2>, scale: number): this;
59
59
  /**
60
60
  * Scales another vector and adds it to this vector.
61
- * @param x The value to add to the X component.
62
- * @param y The value to add to the Y component.
63
- * @param scale The scaling to apply to the input vector.
61
+ * @param x - The value to add to the X component.
62
+ * @param y - The value to add to the Y component.
63
+ * @param scale - The scaling to apply to the input vector.
64
64
  * @returns This instance.
65
65
  */
66
66
  addMultiplyXY(x: number, y: number, scale: number): this;
67
67
  /**
68
68
  * Subtracts another vector from this vector.
69
- * @param vector The vector to subtract from this vector.
69
+ * @param vector - The vector to subtract from this vector.
70
70
  * @returns This instance.
71
71
  */
72
72
  subtract(vector: Readonly<Vector2>): this;
73
73
  /**
74
74
  * Subtracts another vector from this vector.
75
- * @param x The value to subtract from the X component.
76
- * @param y The value to subtract from the Y component.
75
+ * @param x - The value to subtract from the X component.
76
+ * @param y - The value to subtract from the Y component.
77
77
  * @returns This instance.
78
78
  */
79
79
  subtractXY(x: number, y: number): this;
80
80
  /**
81
81
  * Multiplies this vector by another vector.
82
- * @param vector The vector to multiply with this vector.
82
+ * @param vector - The vector to multiply with this vector.
83
83
  * @returns This instance.
84
84
  */
85
85
  multiply(vector: Readonly<Vector2>): this;
86
86
  /**
87
87
  * Multiplies this vector by another vector.
88
- * @param x The value to multiply with the X component.
89
- * @param y The value to multiply with the Y component.
88
+ * @param x - The value to multiply with the X component.
89
+ * @param y - The value to multiply with the Y component.
90
90
  * @returns This instance.
91
91
  */
92
92
  multiplyXY(x: number, y: number): this;
93
93
  /**
94
94
  * Multiplies the vector by the given scale.
95
- * @param scale The scaling to apply to the vector.
95
+ * @param scale - The scaling to apply to the vector.
96
96
  * @returns This instance.
97
97
  */
98
98
  multiplyScale(scale: number): this;
99
99
  /**
100
100
  * Divides this vector by another vector.
101
- * @param vector The vector to divide this vector with.
101
+ * @param vector - The vector to divide this vector with.
102
102
  * @returns This instance.
103
103
  */
104
104
  divide(vector: Readonly<Vector2>): this;
105
105
  /**
106
106
  * Divides this vector by another vector.
107
- * @param x The value to divide the X component with.
108
- * @param y The value to divide the Y component with.
107
+ * @param x - The value to divide the X component with.
108
+ * @param y - The value to divide the Y component with.
109
109
  * @returns This instance.
110
110
  */
111
111
  divideXY(x: number, y: number): this;
112
112
  /**
113
113
  * Divides the vector by the given scale.
114
- * @param scale The scaling to apply to the vector.
114
+ * @param scale - The scaling to apply to the vector.
115
115
  * @returns This instance.
116
116
  */
117
117
  divideScale(scale: number): this;
@@ -127,8 +127,8 @@ export declare class Vector2 {
127
127
  invertMultiply(): this;
128
128
  /**
129
129
  * Clamps the components of the vector at the given boundary.
130
- * @param floor The lowest value to allow.
131
- * @param ceil The largest value to allow.
130
+ * @param floor - The lowest value to allow.
131
+ * @param ceil - The largest value to allow.
132
132
  * @returns This instance.
133
133
  */
134
134
  clamp(floor: number, ceil: number): this;
@@ -144,33 +144,33 @@ export declare class Vector2 {
144
144
  normalize(): this;
145
145
  /**
146
146
  * Compares two vectors.
147
- * @param vector The vector to compare this vector to.
147
+ * @param vector - The vector to compare this vector to.
148
148
  * @returns `true` if the vectors are idently, `false` otherwise.
149
149
  */
150
150
  compare(vector: Readonly<Vector2>): boolean;
151
151
  /**
152
152
  * Linearly moves this vector towards a target vector.
153
- * @param vector The target vector.
154
- * @param t The location on the scale, from `0` to `1`.
153
+ * @param vector - The target vector.
154
+ * @param t - The location on the scale, from `0` to `1`.
155
155
  * @returns This instance.
156
156
  */
157
157
  lerp(vector: Readonly<Vector2>, t: number): this;
158
158
  /**
159
159
  * Rotates the vector by the given angle.
160
- * @param angle The angle in degrees.
160
+ * @param angle - The angle in degrees.
161
161
  * @returns This instance.
162
162
  */
163
163
  rotate(angle: number): this;
164
164
  /**
165
165
  * Returns the dot product between two vectors.
166
- * @param vector The other vector.
166
+ * @param vector - The other vector.
167
167
  * @returns The dot product between the two vectors.
168
168
  */
169
169
  dot(vector: Readonly<Vector2>): number;
170
170
  /**
171
171
  * Returns the dot product between two vectors.
172
- * @param x The X component of the other vector.
173
- * @param y The Y component of the other vector.
172
+ * @param x - The X component of the other vector.
173
+ * @param y - The Y component of the other vector.
174
174
  * @returns The dot product between the two vectors.
175
175
  */
176
176
  dotXY(x: number, y: number): number;
@@ -182,24 +182,24 @@ export declare class Vector2 {
182
182
  }
183
183
  /**
184
184
  * Adds two vectors and returns a new vector with the result.
185
- * @param a The first input vector.
186
- * @param b The second input vector.
185
+ * @param a - The first input vector.
186
+ * @param b - The second input vector.
187
187
  * @returns A new {@linkcode Vector2}.
188
188
  * @group Math
189
189
  */
190
190
  export declare const addVector2: (a: Readonly<Vector2>, b: Readonly<Vector2>) => Vector2;
191
191
  /**
192
192
  * Multiplies two vectors and returns a new vector with the result.
193
- * @param a The first input vector.
194
- * @param b The second input vector.
193
+ * @param a - The first input vector.
194
+ * @param b - The second input vector.
195
195
  * @returns A new {@linkcode Vector2}.
196
196
  * @group Math
197
197
  */
198
198
  export declare const multiplyVector2: (a: Readonly<Vector2>, b: Readonly<Vector2>) => Vector2;
199
199
  /**
200
200
  * Subtracts two vectors and returns a new vector with the result.
201
- * @param a The first input vector.
202
- * @param b The second input vector.
201
+ * @param a - The first input vector.
202
+ * @param b - The second input vector.
203
203
  * @returns A new {@linkcode Vector2}.
204
204
  * @group Math
205
205
  */
@@ -13,8 +13,8 @@ export class Vector2 {
13
13
  y;
14
14
  /**
15
15
  * Constructs a new {@linkcode Vector2}.
16
- * @param x The X component.
17
- * @param y The Y component.
16
+ * @param x - The X component.
17
+ * @param y - The Y component.
18
18
  */
19
19
  constructor(x, y) {
20
20
  this.x = x;
@@ -22,7 +22,7 @@ export class Vector2 {
22
22
  }
23
23
  /**
24
24
  * Creates a copy of another {@linkcode Vector2}.
25
- * @param vector The vector to copy.
25
+ * @param vector - The vector to copy.
26
26
  * @returns A new vector.
27
27
  */
28
28
  static fromVector2(vector) {
@@ -30,7 +30,7 @@ export class Vector2 {
30
30
  }
31
31
  /**
32
32
  * Sets the vector to new coordinates.
33
- * @param vector The coordinates to set the vector to.
33
+ * @param vector - The coordinates to set the vector to.
34
34
  * @returns This instance.
35
35
  */
36
36
  set(vector) {
@@ -38,8 +38,8 @@ export class Vector2 {
38
38
  }
39
39
  /**
40
40
  * Sets the vector to new coordinates.
41
- * @param x The new X component for the vector.
42
- * @param y The new Y component for the vector.
41
+ * @param x - The new X component for the vector.
42
+ * @param y - The new Y component for the vector.
43
43
  * @returns This instance.
44
44
  */
45
45
  setXY(x, y) {
@@ -49,7 +49,7 @@ export class Vector2 {
49
49
  }
50
50
  /**
51
51
  * Adds another vector to this vector.
52
- * @param vector The vector to add to this vector.
52
+ * @param vector - The vector to add to this vector.
53
53
  * @returns This instance.
54
54
  */
55
55
  add(vector) {
@@ -57,8 +57,8 @@ export class Vector2 {
57
57
  }
58
58
  /**
59
59
  * Adds another vector to this vector.
60
- * @param x The value to add to the X component.
61
- * @param y The value to add to the Y component.
60
+ * @param x - The value to add to the X component.
61
+ * @param y - The value to add to the Y component.
62
62
  * @returns This instance.
63
63
  */
64
64
  addXY(x, y) {
@@ -68,8 +68,8 @@ export class Vector2 {
68
68
  }
69
69
  /**
70
70
  * Scales another vector and adds it to this vector.
71
- * @param vector The vector to add to this vector.
72
- * @param scale The scaling to apply to the input vector.
71
+ * @param vector - The vector to add to this vector.
72
+ * @param scale - The scaling to apply to the input vector.
73
73
  * @returns This instance.
74
74
  */
75
75
  addMultiply(vector, scale) {
@@ -77,9 +77,9 @@ export class Vector2 {
77
77
  }
78
78
  /**
79
79
  * Scales another vector and adds it to this vector.
80
- * @param x The value to add to the X component.
81
- * @param y The value to add to the Y component.
82
- * @param scale The scaling to apply to the input vector.
80
+ * @param x - The value to add to the X component.
81
+ * @param y - The value to add to the Y component.
82
+ * @param scale - The scaling to apply to the input vector.
83
83
  * @returns This instance.
84
84
  */
85
85
  addMultiplyXY(x, y, scale) {
@@ -89,7 +89,7 @@ export class Vector2 {
89
89
  }
90
90
  /**
91
91
  * Subtracts another vector from this vector.
92
- * @param vector The vector to subtract from this vector.
92
+ * @param vector - The vector to subtract from this vector.
93
93
  * @returns This instance.
94
94
  */
95
95
  subtract(vector) {
@@ -97,8 +97,8 @@ export class Vector2 {
97
97
  }
98
98
  /**
99
99
  * Subtracts another vector from this vector.
100
- * @param x The value to subtract from the X component.
101
- * @param y The value to subtract from the Y component.
100
+ * @param x - The value to subtract from the X component.
101
+ * @param y - The value to subtract from the Y component.
102
102
  * @returns This instance.
103
103
  */
104
104
  subtractXY(x, y) {
@@ -108,7 +108,7 @@ export class Vector2 {
108
108
  }
109
109
  /**
110
110
  * Multiplies this vector by another vector.
111
- * @param vector The vector to multiply with this vector.
111
+ * @param vector - The vector to multiply with this vector.
112
112
  * @returns This instance.
113
113
  */
114
114
  multiply(vector) {
@@ -116,8 +116,8 @@ export class Vector2 {
116
116
  }
117
117
  /**
118
118
  * Multiplies this vector by another vector.
119
- * @param x The value to multiply with the X component.
120
- * @param y The value to multiply with the Y component.
119
+ * @param x - The value to multiply with the X component.
120
+ * @param y - The value to multiply with the Y component.
121
121
  * @returns This instance.
122
122
  */
123
123
  multiplyXY(x, y) {
@@ -127,7 +127,7 @@ export class Vector2 {
127
127
  }
128
128
  /**
129
129
  * Multiplies the vector by the given scale.
130
- * @param scale The scaling to apply to the vector.
130
+ * @param scale - The scaling to apply to the vector.
131
131
  * @returns This instance.
132
132
  */
133
133
  multiplyScale(scale) {
@@ -137,7 +137,7 @@ export class Vector2 {
137
137
  }
138
138
  /**
139
139
  * Divides this vector by another vector.
140
- * @param vector The vector to divide this vector with.
140
+ * @param vector - The vector to divide this vector with.
141
141
  * @returns This instance.
142
142
  */
143
143
  divide(vector) {
@@ -145,8 +145,8 @@ export class Vector2 {
145
145
  }
146
146
  /**
147
147
  * Divides this vector by another vector.
148
- * @param x The value to divide the X component with.
149
- * @param y The value to divide the Y component with.
148
+ * @param x - The value to divide the X component with.
149
+ * @param y - The value to divide the Y component with.
150
150
  * @returns This instance.
151
151
  */
152
152
  divideXY(x, y) {
@@ -156,7 +156,7 @@ export class Vector2 {
156
156
  }
157
157
  /**
158
158
  * Divides the vector by the given scale.
159
- * @param scale The scaling to apply to the vector.
159
+ * @param scale - The scaling to apply to the vector.
160
160
  * @returns This instance.
161
161
  */
162
162
  divideScale(scale) {
@@ -184,8 +184,8 @@ export class Vector2 {
184
184
  }
185
185
  /**
186
186
  * Clamps the components of the vector at the given boundary.
187
- * @param floor The lowest value to allow.
188
- * @param ceil The largest value to allow.
187
+ * @param floor - The lowest value to allow.
188
+ * @param ceil - The largest value to allow.
189
189
  * @returns This instance.
190
190
  */
191
191
  clamp(floor, ceil) {
@@ -225,7 +225,7 @@ export class Vector2 {
225
225
  }
226
226
  /**
227
227
  * Compares two vectors.
228
- * @param vector The vector to compare this vector to.
228
+ * @param vector - The vector to compare this vector to.
229
229
  * @returns `true` if the vectors are idently, `false` otherwise.
230
230
  */
231
231
  compare(vector) {
@@ -233,8 +233,8 @@ export class Vector2 {
233
233
  }
234
234
  /**
235
235
  * Linearly moves this vector towards a target vector.
236
- * @param vector The target vector.
237
- * @param t The location on the scale, from `0` to `1`.
236
+ * @param vector - The target vector.
237
+ * @param t - The location on the scale, from `0` to `1`.
238
238
  * @returns This instance.
239
239
  */
240
240
  lerp(vector, t) {
@@ -245,7 +245,7 @@ export class Vector2 {
245
245
  }
246
246
  /**
247
247
  * Rotates the vector by the given angle.
248
- * @param angle The angle in degrees.
248
+ * @param angle - The angle in degrees.
249
249
  * @returns This instance.
250
250
  */
251
251
  rotate(angle) {
@@ -258,7 +258,7 @@ export class Vector2 {
258
258
  }
259
259
  /**
260
260
  * Returns the dot product between two vectors.
261
- * @param vector The other vector.
261
+ * @param vector - The other vector.
262
262
  * @returns The dot product between the two vectors.
263
263
  */
264
264
  dot(vector) {
@@ -266,8 +266,8 @@ export class Vector2 {
266
266
  }
267
267
  /**
268
268
  * Returns the dot product between two vectors.
269
- * @param x The X component of the other vector.
270
- * @param y The Y component of the other vector.
269
+ * @param x - The X component of the other vector.
270
+ * @param y - The Y component of the other vector.
271
271
  * @returns The dot product between the two vectors.
272
272
  */
273
273
  dotXY(x, y) {
@@ -283,8 +283,8 @@ export class Vector2 {
283
283
  }
284
284
  /**
285
285
  * Adds two vectors and returns a new vector with the result.
286
- * @param a The first input vector.
287
- * @param b The second input vector.
286
+ * @param a - The first input vector.
287
+ * @param b - The second input vector.
288
288
  * @returns A new {@linkcode Vector2}.
289
289
  * @group Math
290
290
  */
@@ -293,8 +293,8 @@ export const addVector2 = (a, b) => {
293
293
  };
294
294
  /**
295
295
  * Multiplies two vectors and returns a new vector with the result.
296
- * @param a The first input vector.
297
- * @param b The second input vector.
296
+ * @param a - The first input vector.
297
+ * @param b - The second input vector.
298
298
  * @returns A new {@linkcode Vector2}.
299
299
  * @group Math
300
300
  */
@@ -303,8 +303,8 @@ export const multiplyVector2 = (a, b) => {
303
303
  };
304
304
  /**
305
305
  * Subtracts two vectors and returns a new vector with the result.
306
- * @param a The first input vector.
307
- * @param b The second input vector.
306
+ * @param a - The first input vector.
307
+ * @param b - The second input vector.
308
308
  * @returns A new {@linkcode Vector2}.
309
309
  * @group Math
310
310
  */