linearly 0.36.0 → 0.37.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 (47) hide show
  1. package/lib/esm/mat2.d.ts +1 -1
  2. package/lib/esm/mat2.d.ts.map +1 -1
  3. package/lib/esm/mat2.js +3 -2
  4. package/lib/esm/mat2d.d.ts.map +1 -1
  5. package/lib/esm/mat2d.js +4 -5
  6. package/lib/esm/mat3.d.ts.map +1 -1
  7. package/lib/esm/mat3.js +16 -15
  8. package/lib/esm/mat4.d.ts.map +1 -1
  9. package/lib/esm/mat4.js +18 -17
  10. package/lib/esm/quat.js +3 -3
  11. package/lib/esm/scalar.d.ts +6 -35
  12. package/lib/esm/scalar.d.ts.map +1 -1
  13. package/lib/esm/scalar.js +11 -53
  14. package/package.json +9 -4
  15. package/lib/cjs/common.d.ts +0 -16
  16. package/lib/cjs/common.d.ts.map +0 -1
  17. package/lib/cjs/common.js +0 -70
  18. package/lib/cjs/index.d.ts +0 -10
  19. package/lib/cjs/index.d.ts.map +0 -1
  20. package/lib/cjs/index.js +0 -22
  21. package/lib/cjs/mat2.d.ts +0 -272
  22. package/lib/cjs/mat2.d.ts.map +0 -1
  23. package/lib/cjs/mat2.js +0 -473
  24. package/lib/cjs/mat2d.d.ts +0 -329
  25. package/lib/cjs/mat2d.d.ts.map +0 -1
  26. package/lib/cjs/mat2d.js +0 -641
  27. package/lib/cjs/mat3.d.ts +0 -295
  28. package/lib/cjs/mat3.d.ts.map +0 -1
  29. package/lib/cjs/mat3.js +0 -670
  30. package/lib/cjs/mat4.d.ts +0 -532
  31. package/lib/cjs/mat4.d.ts.map +0 -1
  32. package/lib/cjs/mat4.js +0 -1576
  33. package/lib/cjs/quat.d.ts +0 -334
  34. package/lib/cjs/quat.d.ts.map +0 -1
  35. package/lib/cjs/quat.js +0 -802
  36. package/lib/cjs/scalar.d.ts +0 -501
  37. package/lib/cjs/scalar.d.ts.map +0 -1
  38. package/lib/cjs/scalar.js +0 -728
  39. package/lib/cjs/vec2.d.ts +0 -664
  40. package/lib/cjs/vec2.d.ts.map +0 -1
  41. package/lib/cjs/vec2.js +0 -1247
  42. package/lib/cjs/vec3.d.ts +0 -660
  43. package/lib/cjs/vec3.d.ts.map +0 -1
  44. package/lib/cjs/vec3.js +0 -1329
  45. package/lib/cjs/vec4.d.ts +0 -552
  46. package/lib/cjs/vec4.d.ts.map +0 -1
  47. package/lib/cjs/vec4.js +0 -1200
package/lib/cjs/vec3.d.ts DELETED
@@ -1,660 +0,0 @@
1
- import { mat3 } from './mat3';
2
- import { mat4 } from './mat4';
3
- import { quat } from './quat';
4
- /**
5
- * Represents 3D vector
6
- * @category Types
7
- */
8
- export type vec3 = readonly [x: number, y: number, z: number];
9
- /**
10
- * Functions for {@link vec3}, a 3D vector.
11
- * @category Modules
12
- */
13
- export declare namespace vec3 {
14
- /**
15
- * Mutable version of {@link vec3}
16
- * @category Types
17
- */
18
- type Mutable = [x: number, y: number, z: number];
19
- /**
20
- * Creates a new vector from given elements
21
- * @category Generators
22
- */
23
- function of(x: number, y?: number, z?: number): vec3;
24
- /**
25
- * Creates a mutable clone of given vec3
26
- * @category Generators
27
- */
28
- function clone(a: vec3): Mutable;
29
- /**
30
- * @category Constants
31
- */
32
- const zero: vec3;
33
- /**
34
- * @category Constants
35
- */
36
- const one: vec3;
37
- /**
38
- * An unit vector pointing towards positive X. Same as `[1, 0, 0]`
39
- * @category Constants
40
- */
41
- const unitX: vec3;
42
- /**
43
- * An unit vector pointing towards positive Y. Same as `[0, 1, 0]`
44
- * @category Constants
45
- */
46
- const unitY: vec3;
47
- /**
48
- * An unit vector pointing towards positive Z. Same as `[0, 0, 1]`
49
- * @category Constants
50
- */
51
- const unitZ: vec3;
52
- /**
53
- * Adds given vec3's
54
- */
55
- function add(...vs: (vec3 | number)[]): vec3;
56
- /**
57
- * Subtracts given vec3's. When the argument is a single vector, it negates it. Otherwise, it subtracts from left to right.
58
- *
59
- * @shorthands
60
- * - {@link sub}
61
- *
62
- */
63
- function subtract(...vs: (vec3 | number)[]): vec3;
64
- /**
65
- * Alias for {@link subtract}
66
- * @category Shorthands
67
- */
68
- const sub: typeof subtract;
69
- /**
70
- * Subtracts a from b
71
- */
72
- function delta(a: vec3 | number, b: vec3 | number): vec3;
73
- /**
74
- * Multiplies given vec3's
75
- *
76
- * @shorthands
77
- * - {@link mul}
78
- */
79
- function multiply(...vs: (vec3 | number)[]): vec3;
80
- /**
81
- * Alias for {@link multiply}
82
- * @category Shorthands
83
- */
84
- const mul: typeof multiply;
85
- /**
86
- * Divides given vec3's
87
- *
88
- * @shorthands
89
- * - {@link div}
90
- */
91
- function divide(...vs: (vec3 | number)[]): vec3;
92
- /**
93
- * Alias for {@link divide}
94
- * @category Shorthands
95
- */
96
- const div: typeof divide;
97
- /**
98
- * Applies Math.ceil to each component of a vec3
99
- */
100
- function ceil(a: vec3): vec3;
101
- /**
102
- * Applies Math.floor to each component of a vec3
103
- */
104
- function floor(a: vec3): vec3;
105
- /**
106
- * Applies Math.sign to each component of a vec3
107
- */
108
- function sign(v: vec3): vec3;
109
- /**
110
- * Removes the fractional part
111
- * @see https://www.sidefx.com/docs/houdini/vex/functions/trunc.html
112
- */
113
- function trunc(v: vec3): vec3;
114
- /**
115
- * Computes the fractional part of the argument
116
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/fract.xhtml
117
- */
118
- function fract(a: vec3): vec3;
119
- /**
120
- * Compute value of one parameter modulo another. This is computed as x - y * floor(x/y). Unlike JavaScript's `%` operator, the sign of result always matches to `b`.
121
- * @see https://thebookofshaders.com/glossary/?search=mod
122
- */
123
- function mod(a: vec3, b: vec3 | number): vec3;
124
- /**
125
- * Quantize a vec3 to a given step and offset. If the step is 0, the value is returned unchanged.
126
- * @param v The value to quantize
127
- * @param step The step size
128
- * @param offset The offset
129
- * @returns The quantized value
130
- */
131
- function quantize(v: vec3, step: vec3 | number, offset?: vec3 | number): vec3;
132
- /**
133
- * Returns the minimum of given vec3's
134
- */
135
- function min(...vs: (vec3 | number)[]): vec3;
136
- /**
137
- * Returns the maximum of given vec3's
138
- */
139
- function max(...vs: (vec3 | number)[]): vec3;
140
- /**
141
- * Constrain a value to lie between two further values
142
- * @see https://thebookofshaders.com/glossary/?search=clamp
143
- * @param v the value to constrain
144
- * @param min the lower end of the range into which to constrain `v`
145
- * @param max the upper end of the range into which to constrain `v`
146
- */
147
- function clamp(v: vec3, min: vec3 | number, max: vec3 | number): vec3;
148
- /**
149
- * Clamps each component to [0, 1]. Equivalent to {@link saturate}.
150
- */
151
- function clamp01(v: vec3): vec3;
152
- /**
153
- * Clamps each component to [-1, 1]
154
- */
155
- function clamp11(v: vec3): vec3;
156
- /**
157
- * Returns the absolute value of each component of a vec3
158
- */
159
- function abs(v: vec3): vec3;
160
- /**
161
- * Symmetric round the components of a vec3
162
- */
163
- function round(a: vec3): vec3;
164
- /**
165
- * Scales a vec3 by a scalar number
166
- */
167
- function scale(a: vec3, s: number): vec3;
168
- /**
169
- * Returns the average value of the input(s)
170
- * @see https://www.sidefx.com/docs/houdini/vex/functions/avg.html
171
- *
172
- * @shorthands
173
- * - {@link avg}
174
- */
175
- function average(...vs: vec3[]): vec3;
176
- /**
177
- * Alias for {@link average}
178
- * @category Shorthands
179
- */
180
- const avg: typeof average;
181
- /**
182
- * Adds given vec3's after scaling the second operand by a scalar value
183
- */
184
- function scaleAndAdd(a: vec3, b: vec3, scale: number): vec3;
185
- /**
186
- * Calculates the euclidian distance between two vec3's
187
- *
188
- * @shorthands
189
- * - {@link dist}
190
- */
191
- function distance(a: vec3, b: vec3): number;
192
- /**
193
- * Alias for {@link distance}
194
- * @category Shorthands
195
- */
196
- const dist: typeof distance;
197
- /**
198
- * Calculates the squared euclidian distance between two vec3's
199
- */
200
- function squaredDistance(a: vec3, b: vec3): number;
201
- /**
202
- * Alias for {@link squaredDistance}
203
- * @category Shorthands
204
- */
205
- const sqrDist: typeof squaredDistance;
206
- /**
207
- * Returns the absolute difference between corresponding components of two vec3's
208
- *
209
- * @shorthands
210
- * - {@link diff}
211
- */
212
- function difference(a: vec3, b: vec3): vec3;
213
- /**
214
- * Alias for {@link vec3.difference}
215
- * @category Shorthands
216
- */
217
- const diff: typeof difference;
218
- /**
219
- * Calculates the length of a vec3
220
- *
221
- * @shorthands
222
- * - {@link len}
223
- */
224
- function length(a: vec3): number;
225
- /**
226
- * Alias for {@link length}
227
- * @category Shorthands
228
- */
229
- const len: typeof length;
230
- /**
231
- * Calculates the squared length of a vec3
232
- *
233
- * @shorthands
234
- * - {@link sqrLen}
235
- */
236
- function squaredLength(a: vec3): number;
237
- /**
238
- * Alias for {@link squaredLength}
239
- * @category Shorthands
240
- */
241
- const sqrLen: typeof squaredLength;
242
- /**
243
- * Negates the components of a vec3
244
- *
245
- * @shorthands
246
- * - {@link neg}
247
- */
248
- function negate(a: vec3): vec3;
249
- /**
250
- * Alias for {@link negate}
251
- */
252
- const neg: typeof negate;
253
- /**
254
- * Returns the inverse of the components of a vec3
255
- *
256
- * @shorthands
257
- * - {@link inv}
258
- */
259
- function invert(a: vec3): vec3;
260
- /**
261
- * Alias for {@link invert}
262
- * @category Shorthands
263
- */
264
- const inv: typeof invert;
265
- /**
266
- * Returns the result of `v` subtracted from {@link one}.
267
- */
268
- function oneMinus(v: vec3): vec3;
269
- /**
270
- * Takes the value in the range `(omin, omax)` and shifts it to the corresponding value in the new range `(nmin, nmax)`. The function clamps the given value the range `(omin, omax)` before fitting, so the resulting value will be guaranteed to be in the range `(nmin, nmax)`. To avoid clamping use efit instead.
271
- * @see https://www.sidefx.com/docs/houdini/vex/functions/fit.html
272
- * @param value
273
- * @param omin
274
- * @param omax
275
- * @param nmin
276
- * @param nmax
277
- * @returns
278
- */
279
- function fit(value: vec3, omin: vec3, omax: vec3, nmin: vec3, nmax: vec3): vec3;
280
- /**
281
- * Takes the value in the range `(omin, omax)` and shifts it to the corresponding value in the new range `(nmin, nmax)`. Unlike `fit`, this function does not clamp values to the given range. If `omin` and `omax` are the same, the function returns the average of `nmin` and `nmax`.
282
- * @see https://www.sidefx.com/docs/houdini/vex/functions/fit.html
283
- * @param value
284
- * @param omin
285
- * @param omax
286
- * @param nmin
287
- * @param nmax
288
- * @returns
289
- */
290
- function efit(value: vec3, omin: vec3, omax: vec3, nmin: vec3, nmax: vec3): vec3;
291
- /**
292
- * Takes the value in the range `(0, 1)` and shifts it to the corresponding value in the new range `(nmin, nmax)`.
293
- * @see https://www.sidefx.com/docs/houdini/vex/functions/fit01.html
294
- */
295
- function fit01(value: vec3, nmin: vec3, nmax: vec3): vec3;
296
- /**
297
- * Takes the value in the range `(-1, 1)` and shifts it to the corresponding value in the new range `(nmin, nmax)`.
298
- * @see https://www.sidefx.com/docs/houdini/vex/functions/fit11.html
299
- */
300
- function fit11(value: vec3, nmin: vec3, nmax: vec3): vec3;
301
- /**
302
- * Normalize a vec3
303
- */
304
- function normalize(a: vec3): vec3;
305
- /**
306
- * Calculates the dot product of two vec3's
307
- */
308
- function dot(a: vec3, b: vec3): number;
309
- /**
310
- * Computes the cross product of two vec3's
311
- */
312
- function cross(a: vec3, b: vec3): vec3;
313
- /**
314
- * Reflects incident vector `I` about normal `N`. The normal `N` should be normalized.
315
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/reflect.xhtml
316
- * @param I Incident vector
317
- * @param N Normal vector (should be normalized)
318
- */
319
- function reflect(I: vec3, N: vec3): vec3;
320
- /**
321
- * Computes the refraction vector for incident vector `I`, surface normal `N`, and ratio of indices of refraction `eta`. The normal `N` should be normalized.
322
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/refract.xhtml
323
- * @param I Incident vector
324
- * @param N Normal vector (should be normalized)
325
- * @param eta Ratio of indices of refraction
326
- * @returns The refraction vector, or zero vector for total internal reflection
327
- */
328
- function refract(I: vec3, N: vec3, eta: number): vec3;
329
- /**
330
- * Orients a normal to point away from a surface as defined by its incident vector. Returns `N` if `dot(Nref, I) < 0`, otherwise returns `-N`.
331
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/faceforward.xhtml
332
- * @param N Normal vector
333
- * @param I Incident vector
334
- * @param Nref Reference normal
335
- */
336
- function faceforward(N: vec3, I: vec3, Nref: vec3): vec3;
337
- /**
338
- * Projects vector `a` onto vector `b`.
339
- * @param a The vector to project
340
- * @param b The vector to project onto
341
- */
342
- function project(a: vec3, b: vec3): vec3;
343
- /**
344
- * Computes the rejection of vector `a` from vector `b` (the component of `a` perpendicular to `b`).
345
- * @param a The vector to reject
346
- * @param b The vector to reject from
347
- */
348
- function reject(a: vec3, b: vec3): vec3;
349
- /**
350
- * Linearly interpolate between two vec3's. Same as GLSL's built-in `mix` function.
351
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/mix.xhtml
352
- *
353
- * @shorthands
354
- * - {@link mix}
355
- */
356
- function lerp(a: vec3, b: vec3, t: vec3 | number): vec3;
357
- /**
358
- * Alias for {@link lerp}
359
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/mix.xhtml
360
- * @category Shorthands
361
- */
362
- const mix: typeof lerp;
363
- /**
364
- * Returns the amount to mix `min` and `max` to generate the input value `t`. This is the inverse of the `lerp` function. If `min` and `max` are equal, the mixing value is `0.5`.
365
- * @see https://docs.unity3d.com/Packages/com.unity.shadergraph@6.9/manual/Inverse-Lerp-Node.html
366
- * @see https://www.sidefx.com/docs/houdini/vex/functions/invlerp.html
367
- *
368
- * @shorthands
369
- * - {@link invlerp}
370
- */
371
- function inverseLerp(a: vec3, b: vec3, t: vec3): vec3;
372
- /**
373
- * Alias for {@link inverseLerp}
374
- * @category Shorthands
375
- */
376
- const invlerp: typeof inverseLerp;
377
- /**
378
- * Performs a spherical linear interpolation between two vec3's
379
- */
380
- function slerp(a: vec3, b: vec3, t: number): vec3;
381
- /**
382
- * Performs a hermite interpolation with two control points
383
- *
384
- * @param a the first operand
385
- * @param b the second operand
386
- * @param c the third operand
387
- * @param d the fourth operand
388
- * @param t interpolation amount, in the range [0-1], between the two inputs
389
- */
390
- function hermite(a: vec3, b: vec3, c: vec3, d: vec3, t: number): vec3;
391
- /**
392
- * Performs a bezier interpolation with two control points
393
- */
394
- function bezier(a: vec3, b: vec3, c: vec3, d: vec3, t: number): vec3;
395
- /**
396
- * Transforms the vec3 with a mat4.
397
- * 4th vector component is implicitly '1'
398
- */
399
- function transformMat4(a: vec3, m: mat4): vec3;
400
- /**
401
- * Transforms the vec3 with a mat3.
402
- */
403
- function transformMat3(a: vec3, m: mat3): vec3;
404
- /**
405
- * Transforms a vec3 with a matrix or quaternion, automatically choosing the appropriate transformation function based on input type
406
- * @param p The vector to transform
407
- * @param m The transformation matrix (mat3 or mat4) or quaternion
408
- * @returns The transformed vector
409
- *
410
- * @shorthands
411
- * - {@link xform}
412
- */
413
- function transform(p: vec3, m: mat3 | mat4 | quat): vec3;
414
- /**
415
- * Alias for {@link vec3.transform}
416
- * @category Shorthands
417
- */
418
- const xform: typeof transform;
419
- /**
420
- * Transforms the vec3 with a quat
421
- * Can also be used for dual quaternions. (Multiply it with the real part)
422
- *
423
- * @param a the vector to transform
424
- * @param q quaternion to transform with
425
- *
426
- * @shorthands
427
- * - {@link qrotate}
428
- */
429
- function transformQuat(a: vec3, q: quat): vec3;
430
- /**
431
- * Alias for {@link transformQuat}
432
- * @see https://www.sidefx.com/docs/houdini/vex/functions/qrotate.html
433
- * @category Shorthands
434
- */
435
- const qrotate: typeof transformQuat;
436
- /**
437
- * Rotate a 3D vector around the x-axis
438
- * @param v The vec3 point to rotate
439
- * @param origin The origin of the rotation
440
- * @param deg The angle of rotation in degrees
441
- */
442
- function rotateX(v: vec3, origin: vec3, deg: number): vec3;
443
- /**
444
- * Rotate a 3D vector around the y-axis
445
- * @param v The vec3 point to rotate
446
- * @param origin The origin of the rotation
447
- * @param deg The angle of rotation in degrees
448
- */
449
- function rotateY(v: vec3, origin: vec3, deg: number): vec3;
450
- /**
451
- * Rotate a 3D vector around the z-axis
452
- * @param v The vec3 point to rotate
453
- * @param origin The origin of the rotation
454
- * @param deg The angle of rotation in degrees
455
- */
456
- function rotateZ(v: vec3, origin: vec3, deg: number): vec3;
457
- /**
458
- * Get the angle between two 3D vectors
459
- * @param a The first operand
460
- * @param b The second operand
461
- * @returns The angle in degrees
462
- */
463
- function angle(a: vec3, b: vec3): number;
464
- /**
465
- * Apply a step function by comparing two values
466
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/step.xhtml
467
- * @param edge The location of the edge of the step function.
468
- * @param x The value to be used to generate the step function.
469
- * @returns
470
- */
471
- function step(edge: vec3 | number, v: vec3 | number): vec3;
472
- /**
473
- * Perform Hermite interpolation between two values.
474
- * @see https://registry.khronos.org/OpenGL-Refpages/gl4/html/smoothstep.xhtml
475
- * @param edge0 Lower edge of the Hermite function.
476
- * @param edge1 Upper edge of the Hermite function.
477
- * @param x Source value for interpolation.
478
- * @returns
479
- */
480
- function smoothstep(edge0: vec3 | number, edge1: vec3 | number, x: vec3): vec3;
481
- /**
482
- * Converts the components of a vec3 from radians to degrees
483
- * @param rad The input vec3 in radians
484
- * @returns The degrees equivalent of the input
485
- *
486
- * @shorthands
487
- * - {@link deg}
488
- */
489
- function degrees(rad: vec3): vec3;
490
- /**
491
- * Alias for {@link degrees}
492
- * @category Shorthands
493
- */
494
- const deg: typeof degrees;
495
- /**
496
- * Converts the components of a vec3 from degrees to radians
497
- * @param deg The input vec3 in degrees
498
- * @returns The radians equivalent of the input
499
- *
500
- * @shorthands
501
- * - {@link rad}
502
- */
503
- function radians(deg: vec3): vec3;
504
- /**
505
- * Alias for {@link radians}
506
- * @category Shorthands
507
- */
508
- const rad: typeof radians;
509
- /**
510
- * Returns the sine of each component, which are angles in degrees
511
- */
512
- function sin(deg: vec3): vec3;
513
- /**
514
- * Returns the cosine of each component, which are angles in degrees
515
- */
516
- function cos(deg: vec3): vec3;
517
- /**
518
- * Returns the tangent of each component, which are angles in degrees
519
- */
520
- function tan(deg: vec3): vec3;
521
- /**
522
- * Returns the arcsine of each component, in degrees
523
- */
524
- function asin(v: vec3): vec3;
525
- /**
526
- * Returns the arc cosine of each component, in degrees
527
- */
528
- function acos(v: vec3): vec3;
529
- /**
530
- * Returns the arc-tangent of the parameters. If `x` is not provided, `y` is regarded as a value of `y/x`.
531
- * @param y the values of the y-coordinate
532
- * @param x the values of the x-coordinate
533
- * @returns the angle in degrees
534
- * @see https://thebookofshaders.com/glossary/?search=atan
535
- * */
536
- function atan(y: vec3, x?: vec3): vec3;
537
- /**
538
- * Returns the arc-tangent of the parameters.
539
- * @param y the values of the y-coordinate
540
- * @param x the values of the x-coordinate
541
- * @returns the angle in degrees
542
- * @see https://thebookofshaders.com/glossary/?search=atan
543
- * */
544
- function atan2(y: vec3, x: vec3): vec3;
545
- /**
546
- * Returns the base to the exponent power, component-wise
547
- */
548
- function pow(a: vec3, b: vec3 | number): vec3;
549
- /**
550
- * Returns e raised to the power of each component
551
- */
552
- function exp(v: vec3): vec3;
553
- /**
554
- * Returns the natural logarithm of each component
555
- */
556
- function log(v: vec3): vec3;
557
- /**
558
- * Returns 2 raised to the power of the parameter
559
- * @param v the value of the power to which 2 will be raised
560
- */
561
- function exp2(v: vec3): vec3;
562
- /**
563
- * Returns the base-2 logarithm of each component
564
- */
565
- function log2(v: vec3): vec3;
566
- /**
567
- * Returns the square root of each component
568
- */
569
- function sqrt(v: vec3): vec3;
570
- /**
571
- * Returns the inverse of the square root of the parameter
572
- * @param v the value of which to take the inverse of the square root
573
- * @see https://thebookofshaders.com/glossary/?search=inversesqrt
574
- *
575
- * @shorthands
576
- * - {@link invsqrt}
577
- */
578
- function inverseSqrt(v: vec3): vec3;
579
- /**
580
- * Alias for {@link inverseSqrt}
581
- * @category Shorthands
582
- */
583
- const invsqrt: typeof inverseSqrt;
584
- /**
585
- * Returns the hyperbolic sine of each component
586
- */
587
- function sinh(v: vec3): vec3;
588
- /**
589
- * Returns the hyperbolic cosine of each component
590
- */
591
- function cosh(v: vec3): vec3;
592
- /**
593
- * Returns the hyperbolic tangent of each component
594
- */
595
- function tanh(v: vec3): vec3;
596
- /**
597
- * Returns the inverse hyperbolic sine of each component
598
- */
599
- function asinh(v: vec3): vec3;
600
- /**
601
- * Returns the inverse hyperbolic cosine of each component
602
- */
603
- function acosh(v: vec3): vec3;
604
- /**
605
- * Returns the inverse hyperbolic tangent of each component
606
- */
607
- function atanh(v: vec3): vec3;
608
- /**
609
- * Clamps each component to [0, 1]. Equivalent to HLSL's `saturate`.
610
- */
611
- function saturate(v: vec3): vec3;
612
- /**
613
- * Returns the sum of all components of a vector.
614
- * Equivalent to GLM's `glm::compAdd`.
615
- */
616
- function compAdd(v: vec3): number;
617
- /**
618
- * Returns the product of all components of a vector.
619
- * Equivalent to GLM's `glm::compMul`.
620
- */
621
- function compMul(v: vec3): number;
622
- /**
623
- * Returns whether or not the vectors have exactly the same elements in the same position (when compared with `===`)
624
- *
625
- * @shorthands
626
- * - {@link eq}
627
- */
628
- function exactEquals(a: vec3, b: vec3): boolean;
629
- /**
630
- * Alias for {@link exactEquals}
631
- * @category Shorthands
632
- */
633
- const eq: typeof exactEquals;
634
- /**
635
- * Returns whether or not the vectors have approximately the same elements in the same position.
636
- *
637
- * @shorthands
638
- * - {@link approx}
639
- * - {@link equals}
640
- */
641
- function approxEquals(a: vec3, b: vec3): boolean;
642
- /**
643
- * Alias for {@link approxEquals}
644
- * @category Shorthands
645
- */
646
- const approx: typeof approxEquals;
647
- /**
648
- * Alias for {@link approxEquals}. This is provided for compatibility with gl-matrix.
649
- * @category Shorthands
650
- * @deprecated Use {@link approxEquals} instead
651
- */
652
- const equals: typeof approxEquals;
653
- /**
654
- * Returns the string representation of a vec3
655
- * @param v vector to represent as a string
656
- * @param fractionDigits number of digits to appear after the decimal point
657
- */
658
- const toString: (v: vec3, fractionDigits?: number) => string;
659
- }
660
- //# sourceMappingURL=vec3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vec3.d.ts","sourceRoot":"","sources":["../../src/vec3.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,I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