curvy 1.0.1 → 1.0.2

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 (70) hide show
  1. package/dist/curve/cubic2d.d.mts +1 -1
  2. package/dist/curve/cubic2d.d.ts +1 -1
  3. package/dist/curve/cubic2d.mjs +4 -4
  4. package/dist/curve/linear2d.d.mts +1 -1
  5. package/dist/curve/linear2d.d.ts +1 -1
  6. package/dist/curve/linear2d.mjs +3 -3
  7. package/dist/curve/quadratic2d.d.mts +1 -1
  8. package/dist/curve/quadratic2d.d.ts +1 -1
  9. package/dist/curve/quadratic2d.mjs +4 -4
  10. package/dist/interval.mjs +1 -1
  11. package/dist/matrix/matrix2x2.d.mts +1 -1
  12. package/dist/matrix/matrix2x2.d.ts +1 -1
  13. package/dist/matrix/matrix2x2.mjs +3 -3
  14. package/dist/matrix/matrix3x3.d.mts +1 -1
  15. package/dist/matrix/matrix3x3.d.ts +1 -1
  16. package/dist/matrix/matrix3x3.mjs +5 -5
  17. package/dist/matrix/matrix4x4.d.mts +1 -1
  18. package/dist/matrix/matrix4x4.d.ts +1 -1
  19. package/dist/matrix/matrix4x4.mjs +6 -6
  20. package/dist/path/cubic2d.d.mts +1 -1
  21. package/dist/path/cubic2d.d.ts +1 -1
  22. package/dist/path/cubic2d.mjs +5 -4
  23. package/dist/path/linear2d.d.mts +1 -1
  24. package/dist/path/linear2d.d.ts +1 -1
  25. package/dist/path/linear2d.mjs +3 -3
  26. package/dist/path/quadratic2d.d.mts +1 -1
  27. package/dist/path/quadratic2d.d.ts +1 -1
  28. package/dist/path/quadratic2d.mjs +4 -4
  29. package/dist/polynomial/cubic.d.mts +1 -1
  30. package/dist/polynomial/cubic.d.ts +1 -1
  31. package/dist/polynomial/cubic.mjs +3 -3
  32. package/dist/polynomial/linear.d.mts +1 -1
  33. package/dist/polynomial/linear.d.ts +1 -1
  34. package/dist/polynomial/linear.mjs +2 -2
  35. package/dist/polynomial/quadratic.d.mts +1 -1
  36. package/dist/polynomial/quadratic.d.ts +1 -1
  37. package/dist/polynomial/quadratic.mjs +3 -3
  38. package/dist/shared/{curvy.Cty3LrOR.mjs → curvy.B1zfBfvf.mjs} +6 -2
  39. package/dist/shared/{curvy.DOSsf40r.mjs → curvy.BPOevbwG.mjs} +7 -8
  40. package/dist/shared/{curvy.CT38g_II.d.mts → curvy.Bf5TIk31.d.mts} +1 -1
  41. package/dist/shared/{curvy.CT38g_II.d.ts → curvy.Bf5TIk31.d.ts} +1 -1
  42. package/dist/shared/{curvy.DM6AiKbn.mjs → curvy.BrrC9QVB.mjs} +2 -2
  43. package/dist/shared/{curvy.ChkqgKuv.mjs → curvy.DLOeble8.mjs} +9 -1
  44. package/dist/shared/curvy.DN9ptodP.mjs +55 -0
  45. package/dist/shared/{curvy.bvP77ZZm.mjs → curvy.DTco5vku.mjs} +3 -3
  46. package/dist/shared/{curvy.D7bhnwZy.mjs → curvy.DV4S13Cq.mjs} +3 -2
  47. package/dist/shared/{curvy.DB7nQmVs.mjs → curvy.O57gIOmy.mjs} +1 -1
  48. package/dist/shared/{curvy.D7MEXd5g.mjs → curvy.ZjG-q57I.mjs} +2 -2
  49. package/dist/splines/basis2d.d.mts +36 -0
  50. package/dist/splines/basis2d.d.ts +36 -0
  51. package/dist/splines/basis2d.mjs +86 -0
  52. package/dist/splines/bezier2d.d.mts +1 -1
  53. package/dist/splines/bezier2d.d.ts +1 -1
  54. package/dist/splines/bezier2d.mjs +15 -49
  55. package/dist/splines/cardinal2d.d.mts +44 -0
  56. package/dist/splines/cardinal2d.d.ts +44 -0
  57. package/dist/splines/cardinal2d.mjs +116 -0
  58. package/dist/splines/hermite2d.d.mts +31 -0
  59. package/dist/splines/hermite2d.d.ts +31 -0
  60. package/dist/splines/hermite2d.mjs +74 -0
  61. package/dist/vector/vector2.d.mts +6 -2
  62. package/dist/vector/vector2.d.ts +6 -2
  63. package/dist/vector/vector2.mjs +4 -3
  64. package/dist/vector/vector3.d.mts +6 -2
  65. package/dist/vector/vector3.d.ts +6 -2
  66. package/dist/vector/vector3.mjs +4 -3
  67. package/dist/vector/vector4.d.mts +6 -2
  68. package/dist/vector/vector4.d.ts +6 -2
  69. package/dist/vector/vector4.mjs +4 -3
  70. package/package.json +13 -1
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.mjs';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Interval } from '../interval.mjs';
4
4
  import { C as CubicPolynomial } from '../shared/curvy.DwHW5Fqt.mjs';
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.js';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Interval } from '../interval.js';
4
4
  import { C as CubicPolynomial } from '../shared/curvy.CkJRVnqj.js';
@@ -1,4 +1,4 @@
1
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
2
2
  import { size, scaleShift, biunit } from '../interval.mjs';
3
3
  import { G as GL32_W0, a as GL32_X0, b as GL32_W1, c as GL32_X1, d as GL32_W2, e as GL32_X2, f as GL32_W3, g as GL32_X3, h as GL32_W4, i as GL32_X4, j as GL32_W5, k as GL32_X5, l as GL32_W6, m as GL32_X6, n as GL32_W7, o as GL32_X7, p as GL32_W8, q as GL32_X8, r as GL32_W9, s as GL32_X9, t as GL32_W10, u as GL32_X10, v as GL32_W11, w as GL32_X11, x as GL32_W12, y as GL32_X12, z as GL32_W13, A as GL32_X13, B as GL32_W14, C as GL32_X14, D as GL32_W15, E as GL32_X15 } from '../shared/curvy.DmVFTi0N.mjs';
4
4
  import { make, solve as solve$2, derivative as derivative$2 } from '../polynomial/cubic.mjs';
@@ -6,9 +6,9 @@ import { make as make$2 } from '../polynomial/quadratic.mjs';
6
6
  import { make as make$1, magnitude, cross } from '../vector/vector2.mjs';
7
7
  import { solve as solve$4 } from './linear2d.mjs';
8
8
  import { length as length$2, fromPolynomials as fromPolynomials$2, solve as solve$3, derivative as derivative$1 } from './quadratic2d.mjs';
9
- import '../shared/curvy.D7MEXd5g.mjs';
10
- import '../shared/curvy.DB7nQmVs.mjs';
11
- import '../shared/curvy.DOSsf40r.mjs';
9
+ import '../shared/curvy.ZjG-q57I.mjs';
10
+ import '../shared/curvy.O57gIOmy.mjs';
11
+ import '../shared/curvy.BPOevbwG.mjs';
12
12
  import '../polynomial/linear.mjs';
13
13
 
14
14
  const CubicCurve2dTypeId = Symbol("curvy/curve/cubic2d");
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.mjs';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Interval } from '../interval.mjs';
4
4
  import { L as LinearPolynomial } from '../shared/curvy.DwHW5Fqt.mjs';
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.js';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Interval } from '../interval.js';
4
4
  import { L as LinearPolynomial } from '../shared/curvy.CkJRVnqj.js';
@@ -1,9 +1,9 @@
1
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
2
2
  import { make, solve as solve$2 } from '../polynomial/linear.mjs';
3
3
  import { make as make$1 } from '../vector/vector2.mjs';
4
- import '../shared/curvy.DB7nQmVs.mjs';
4
+ import '../shared/curvy.O57gIOmy.mjs';
5
5
  import '../interval.mjs';
6
- import '../shared/curvy.DOSsf40r.mjs';
6
+ import '../shared/curvy.BPOevbwG.mjs';
7
7
 
8
8
  const LinearCurve2dTypeId = Symbol("curvy/curve/linear2d");
9
9
  class LinearCurve2dImpl extends Pipeable {
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.mjs';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Interval } from '../interval.mjs';
4
4
  import { Q as QuadraticPolynomial } from '../shared/curvy.DwHW5Fqt.mjs';
@@ -1,4 +1,4 @@
1
- import { e as TwoDimensional } from '../shared/curvy.CT38g_II.js';
1
+ import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Interval } from '../interval.js';
4
4
  import { Q as QuadraticPolynomial } from '../shared/curvy.CkJRVnqj.js';
@@ -1,13 +1,13 @@
1
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
2
2
  import { size, scaleShift, biunit } from '../interval.mjs';
3
3
  import { G as GL32_W0, a as GL32_X0, b as GL32_W1, c as GL32_X1, d as GL32_W2, e as GL32_X2, f as GL32_W3, g as GL32_X3, h as GL32_W4, i as GL32_X4, j as GL32_W5, k as GL32_X5, l as GL32_W6, m as GL32_X6, n as GL32_W7, o as GL32_X7, p as GL32_W8, q as GL32_X8, r as GL32_W9, s as GL32_X9, t as GL32_W10, u as GL32_X10, v as GL32_W11, w as GL32_X11, x as GL32_W12, y as GL32_X12, z as GL32_W13, A as GL32_X13, B as GL32_W14, C as GL32_X14, D as GL32_W15, E as GL32_X15 } from '../shared/curvy.DmVFTi0N.mjs';
4
4
  import { make as make$2 } from '../polynomial/linear.mjs';
5
5
  import { make, solve as solve$2, derivative as derivative$2 } from '../polynomial/quadratic.mjs';
6
6
  import { make as make$1, magnitude, cross } from '../vector/vector2.mjs';
7
7
  import { fromPolynomials as fromPolynomials$2, length as length$2, solve as solve$3, derivative as derivative$3 } from './linear2d.mjs';
8
- import '../shared/curvy.DB7nQmVs.mjs';
9
- import '../shared/curvy.D7MEXd5g.mjs';
10
- import '../shared/curvy.DOSsf40r.mjs';
8
+ import '../shared/curvy.O57gIOmy.mjs';
9
+ import '../shared/curvy.ZjG-q57I.mjs';
10
+ import '../shared/curvy.BPOevbwG.mjs';
11
11
 
12
12
  const QuadraticCurve2dTypeId = Symbol(
13
13
  "curvy/curve/quadratic2d"
package/dist/interval.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { d as dual, P as Pipeable, r as round } from './shared/curvy.ChkqgKuv.mjs';
1
+ import { d as dual, P as Pipeable, r as round } from './shared/curvy.DLOeble8.mjs';
2
2
 
3
3
  const TypeId = Symbol.for("curvy/interval");
4
4
  class IntervalImpl extends Pipeable {
@@ -1,4 +1,4 @@
1
- import { c as TwoDimensionalIndex, d as TwoDimensionalComponent } from '../shared/curvy.CT38g_II.mjs';
1
+ import { d as TwoDimensionalIndex, e as TwoDimensionalComponent } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Vector2 } from '../vector/vector2.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { c as TwoDimensionalIndex, d as TwoDimensionalComponent } from '../shared/curvy.CT38g_II.js';
1
+ import { d as TwoDimensionalIndex, e as TwoDimensionalComponent } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Vector2 } from '../vector/vector2.js';
4
4
 
@@ -1,6 +1,6 @@
1
- import { i as isMatrix2x2$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, v as vectorProductLeft$1, c as vectorProductRight$1, e as solveSystem$1, t as toRows$1, g as toColumns$1, r as rowVector$1, h as columnVector$1, j as transpose$1, k as reverseRows$1, l as reverseColumns$1 } from '../shared/curvy.DM6AiKbn.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
3
- import '../shared/curvy.DOSsf40r.mjs';
1
+ import { i as isMatrix2x2$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, v as vectorProductLeft$1, c as vectorProductRight$1, e as solveSystem$1, t as toRows$1, g as toColumns$1, r as rowVector$1, h as columnVector$1, j as transpose$1, k as reverseRows$1, l as reverseColumns$1 } from '../shared/curvy.BrrC9QVB.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
+ import '../shared/curvy.BPOevbwG.mjs';
4
4
 
5
5
  const isMatrix2x2 = isMatrix2x2$1;
6
6
  const matrix2x2 = make;
@@ -1,4 +1,4 @@
1
- import { T as ThreeDimensionalIndex, b as ThreeDimensionalComponent } from '../shared/curvy.CT38g_II.mjs';
1
+ import { b as ThreeDimensionalIndex, c as ThreeDimensionalComponent } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { Vector3 } from '../vector/vector3.mjs';
3
3
  import { Matrix2x2 } from './matrix2x2.mjs';
4
4
  import '../shared/curvy.BN-oFBsc.mjs';
@@ -1,4 +1,4 @@
1
- import { T as ThreeDimensionalIndex, b as ThreeDimensionalComponent } from '../shared/curvy.CT38g_II.js';
1
+ import { b as ThreeDimensionalIndex, c as ThreeDimensionalComponent } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { Vector3 } from '../vector/vector3.js';
3
3
  import { Matrix2x2 } from './matrix2x2.js';
4
4
  import '../shared/curvy.BN-oFBsc.js';
@@ -1,8 +1,8 @@
1
- import { i as isMatrix3x3$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, c as minor$1, v as vectorProductLeft$1, e as vectorProductRight$1, g as solveSystem$1, t as toRows$1, h as toColumns$1, r as rowVector$1, j as columnVector$1, k as transpose$1, l as reverseRows$1, n as reverseColumns$1 } from '../shared/curvy.bvP77ZZm.mjs';
2
- import '../shared/curvy.DM6AiKbn.mjs';
3
- import '../shared/curvy.ChkqgKuv.mjs';
4
- import '../shared/curvy.DOSsf40r.mjs';
5
- import '../shared/curvy.D7bhnwZy.mjs';
1
+ import { i as isMatrix3x3$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, c as minor$1, v as vectorProductLeft$1, e as vectorProductRight$1, g as solveSystem$1, t as toRows$1, h as toColumns$1, r as rowVector$1, j as columnVector$1, k as transpose$1, l as reverseRows$1, n as reverseColumns$1 } from '../shared/curvy.DTco5vku.mjs';
2
+ import '../shared/curvy.BrrC9QVB.mjs';
3
+ import '../shared/curvy.DLOeble8.mjs';
4
+ import '../shared/curvy.BPOevbwG.mjs';
5
+ import '../shared/curvy.DV4S13Cq.mjs';
6
6
 
7
7
  const isMatrix3x3 = isMatrix3x3$1;
8
8
  const matrix3x3 = make;
@@ -1,4 +1,4 @@
1
- import { F as FourDimensionalIndex, a as FourDimensionalComponent } from '../shared/curvy.CT38g_II.mjs';
1
+ import { F as FourDimensionalIndex, a as FourDimensionalComponent } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Vector4 } from '../vector/vector4.mjs';
4
4
  import { Matrix3x3 } from './matrix3x3.mjs';
@@ -1,4 +1,4 @@
1
- import { F as FourDimensionalIndex, a as FourDimensionalComponent } from '../shared/curvy.CT38g_II.js';
1
+ import { F as FourDimensionalIndex, a as FourDimensionalComponent } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Vector4 } from '../vector/vector4.js';
4
4
  import { Matrix3x3 } from './matrix3x3.js';
@@ -1,9 +1,9 @@
1
- import { n as toFourDimensionalIndex } from '../shared/curvy.DM6AiKbn.mjs';
2
- import { d as dual, r as round, i as invariant, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
3
- import { c as components, m as make$3, d as dot } from '../shared/curvy.Cty3LrOR.mjs';
4
- import { d as determinant$2, m as make$2 } from '../shared/curvy.bvP77ZZm.mjs';
5
- import '../shared/curvy.DOSsf40r.mjs';
6
- import '../shared/curvy.D7bhnwZy.mjs';
1
+ import { n as toFourDimensionalIndex } from '../shared/curvy.BrrC9QVB.mjs';
2
+ import { d as dual, r as round, i as invariant, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
3
+ import { c as components, m as make$3, d as dot } from '../shared/curvy.B1zfBfvf.mjs';
4
+ import { d as determinant$2, m as make$2 } from '../shared/curvy.DTco5vku.mjs';
5
+ import '../shared/curvy.BPOevbwG.mjs';
6
+ import '../shared/curvy.DV4S13Cq.mjs';
7
7
 
8
8
  const Matrix4x4TypeId = Symbol.for("curvy/matrix4x4");
9
9
  class Matrix4x4Impl extends Pipeable {
@@ -1,7 +1,7 @@
1
1
  import { CubicCurve2d } from '../curve/cubic2d.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Vector2 } from '../vector/vector2.mjs';
4
- import '../shared/curvy.CT38g_II.mjs';
4
+ import '../shared/curvy.Bf5TIk31.mjs';
5
5
  import '../interval.mjs';
6
6
  import '../shared/curvy.DwHW5Fqt.mjs';
7
7
  import '../vector/vector3.mjs';
@@ -1,7 +1,7 @@
1
1
  import { CubicCurve2d } from '../curve/cubic2d.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Vector2 } from '../vector/vector2.js';
4
- import '../shared/curvy.CT38g_II.js';
4
+ import '../shared/curvy.Bf5TIk31.js';
5
5
  import '../interval.js';
6
6
  import '../shared/curvy.CkJRVnqj.js';
7
7
  import '../vector/vector3.js';
@@ -1,13 +1,13 @@
1
1
  import { length as length$2, solve as solve$2 } from '../curve/cubic2d.mjs';
2
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
2
+ import { d as dual, r as round, P as Pipeable, i as invariant } from '../shared/curvy.DLOeble8.mjs';
3
3
  import { unit } from '../interval.mjs';
4
4
  import '../shared/curvy.DmVFTi0N.mjs';
5
5
  import '../polynomial/cubic.mjs';
6
- import '../shared/curvy.D7MEXd5g.mjs';
7
- import '../shared/curvy.DB7nQmVs.mjs';
6
+ import '../shared/curvy.ZjG-q57I.mjs';
7
+ import '../shared/curvy.O57gIOmy.mjs';
8
8
  import '../polynomial/quadratic.mjs';
9
9
  import '../vector/vector2.mjs';
10
- import '../shared/curvy.DOSsf40r.mjs';
10
+ import '../shared/curvy.BPOevbwG.mjs';
11
11
  import '../curve/linear2d.mjs';
12
12
  import '../polynomial/linear.mjs';
13
13
  import '../curve/quadratic2d.mjs';
@@ -17,6 +17,7 @@ class CubicPath2dImpl extends Pipeable {
17
17
  [CubicPath2dTypeId] = CubicPath2dTypeId;
18
18
  curves;
19
19
  constructor(curves) {
20
+ invariant(curves.length > 0, "cubic path requires at least one curve");
20
21
  super();
21
22
  this.curves = curves;
22
23
  }
@@ -1,7 +1,7 @@
1
1
  import { LinearCurve2d } from '../curve/linear2d.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Vector2 } from '../vector/vector2.mjs';
4
- import '../shared/curvy.CT38g_II.mjs';
4
+ import '../shared/curvy.Bf5TIk31.mjs';
5
5
  import '../interval.mjs';
6
6
  import '../shared/curvy.DwHW5Fqt.mjs';
7
7
  import '../vector/vector3.mjs';
@@ -1,7 +1,7 @@
1
1
  import { LinearCurve2d } from '../curve/linear2d.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Vector2 } from '../vector/vector2.js';
4
- import '../shared/curvy.CT38g_II.js';
4
+ import '../shared/curvy.Bf5TIk31.js';
5
5
  import '../interval.js';
6
6
  import '../shared/curvy.CkJRVnqj.js';
7
7
  import '../vector/vector3.js';
@@ -1,10 +1,10 @@
1
1
  import { length as length$2, solve as solve$2 } from '../curve/linear2d.mjs';
2
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
2
+ import { d as dual, r as round, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
3
3
  import { unit } from '../interval.mjs';
4
4
  import '../polynomial/linear.mjs';
5
- import '../shared/curvy.DB7nQmVs.mjs';
5
+ import '../shared/curvy.O57gIOmy.mjs';
6
6
  import '../vector/vector2.mjs';
7
- import '../shared/curvy.DOSsf40r.mjs';
7
+ import '../shared/curvy.BPOevbwG.mjs';
8
8
 
9
9
  const LinearPath2dTypeId = Symbol("curvy/path/linear2d");
10
10
  class LinearPath2dImpl extends Pipeable {
@@ -1,7 +1,7 @@
1
1
  import { QuadraticCurve2d } from '../curve/quadratic2d.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
  import { Vector2 } from '../vector/vector2.mjs';
4
- import '../shared/curvy.CT38g_II.mjs';
4
+ import '../shared/curvy.Bf5TIk31.mjs';
5
5
  import '../interval.mjs';
6
6
  import '../shared/curvy.DwHW5Fqt.mjs';
7
7
  import '../vector/vector3.mjs';
@@ -1,7 +1,7 @@
1
1
  import { QuadraticCurve2d } from '../curve/quadratic2d.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
  import { Vector2 } from '../vector/vector2.js';
4
- import '../shared/curvy.CT38g_II.js';
4
+ import '../shared/curvy.Bf5TIk31.js';
5
5
  import '../interval.js';
6
6
  import '../shared/curvy.CkJRVnqj.js';
7
7
  import '../vector/vector3.js';
@@ -1,13 +1,13 @@
1
1
  import { length as length$2, solve as solve$2 } from '../curve/quadratic2d.mjs';
2
- import { d as dual, r as round, P as Pipeable } from '../shared/curvy.ChkqgKuv.mjs';
2
+ import { d as dual, r as round, P as Pipeable } from '../shared/curvy.DLOeble8.mjs';
3
3
  import { unit } from '../interval.mjs';
4
4
  import '../shared/curvy.DmVFTi0N.mjs';
5
5
  import '../polynomial/linear.mjs';
6
- import '../shared/curvy.DB7nQmVs.mjs';
6
+ import '../shared/curvy.O57gIOmy.mjs';
7
7
  import '../polynomial/quadratic.mjs';
8
- import '../shared/curvy.D7MEXd5g.mjs';
8
+ import '../shared/curvy.ZjG-q57I.mjs';
9
9
  import '../vector/vector2.mjs';
10
- import '../shared/curvy.DOSsf40r.mjs';
10
+ import '../shared/curvy.BPOevbwG.mjs';
11
11
  import '../curve/linear2d.mjs';
12
12
 
13
13
  const QuadraticPath2dTypeId = Symbol(
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.mjs';
2
2
  import '../interval.mjs';
3
3
  import '../vector/vector4.mjs';
4
4
  export { C as CubicPolynomial, j as curvature, d as derivative, g as domain, e as extrema, f as fromVector, i as isCubicPolynomial, l as length, m as make, c as monotonicity, h as range, r as roots, s as solve, a as solveInverse, b as toInverseSolver, t as toSolver } from '../shared/curvy.DwHW5Fqt.mjs';
5
- import '../shared/curvy.CT38g_II.mjs';
5
+ import '../shared/curvy.Bf5TIk31.mjs';
6
6
  import '../vector/vector2.mjs';
7
7
  import '../vector/vector3.mjs';
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.js';
2
2
  import '../interval.js';
3
3
  import '../vector/vector4.js';
4
4
  export { C as CubicPolynomial, j as curvature, d as derivative, g as domain, e as extrema, f as fromVector, i as isCubicPolynomial, l as length, m as make, c as monotonicity, h as range, r as roots, s as solve, a as solveInverse, b as toInverseSolver, t as toSolver } from '../shared/curvy.CkJRVnqj.js';
5
- import '../shared/curvy.CT38g_II.js';
5
+ import '../shared/curvy.Bf5TIk31.js';
6
6
  import '../vector/vector2.js';
7
7
  import '../vector/vector3.js';
@@ -1,8 +1,8 @@
1
- import { d as dual, r as round } from '../shared/curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round } from '../shared/curvy.DLOeble8.mjs';
2
2
  import { size, filter, fromMinMax, scaleShift, biunit } from '../interval.mjs';
3
3
  import { G as GL32_W0, a as GL32_X0, b as GL32_W1, c as GL32_X1, d as GL32_W2, e as GL32_X2, f as GL32_W3, g as GL32_X3, h as GL32_W4, i as GL32_X4, j as GL32_W5, k as GL32_X5, l as GL32_W6, m as GL32_X6, n as GL32_W7, o as GL32_X7, p as GL32_W8, q as GL32_X8, r as GL32_W9, s as GL32_X9, t as GL32_W10, u as GL32_X10, v as GL32_W11, w as GL32_X11, x as GL32_W12, y as GL32_X12, z as GL32_W13, A as GL32_X13, B as GL32_W14, C as GL32_X14, D as GL32_W15, E as GL32_X15 } from '../shared/curvy.DmVFTi0N.mjs';
4
- import { C as CubicPolynomialImpl, a as CubicPolynomialTypeId, s as solveInverse$2, m as make$2, r as roots$2, b as monotonicity$3, g as guaranteedMonotonicityFromComparison, l as length$3, c as solve$2, d as derivative$2 } from '../shared/curvy.D7MEXd5g.mjs';
5
- import { m as monotonicity$2, a as make$3, l as length$2, s as solve$3 } from '../shared/curvy.DB7nQmVs.mjs';
4
+ import { C as CubicPolynomialImpl, a as CubicPolynomialTypeId, s as solveInverse$2, m as make$2, r as roots$2, b as monotonicity$3, g as guaranteedMonotonicityFromComparison, l as length$3, c as solve$2, d as derivative$2 } from '../shared/curvy.ZjG-q57I.mjs';
5
+ import { m as monotonicity$2, a as make$3, l as length$2, s as solve$3 } from '../shared/curvy.O57gIOmy.mjs';
6
6
 
7
7
  const make$1 = (c0 = 0, c1 = 0, c2 = 0, c3 = 0) => new CubicPolynomialImpl(c0, c1, c2, c3);
8
8
  const isCubicPolynomial$1 = (v) => typeof v === "object" && v !== null && CubicPolynomialTypeId in v;
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.mjs';
2
2
  import '../interval.mjs';
3
3
  import '../vector/vector2.mjs';
4
4
  export { L as LinearPolynomial, U as antiderivative, T as derivative, V as domain, J as fromPointSlope, K as fromPoints, I as fromVector, G as isLinearPolynomial, X as length, H as make, S as monotonicity, W as range, R as root, M as solve, O as solveInverse, P as toInverseSolver, N as toSolver } from '../shared/curvy.DwHW5Fqt.mjs';
5
- import '../shared/curvy.CT38g_II.mjs';
5
+ import '../shared/curvy.Bf5TIk31.mjs';
6
6
  import '../vector/vector3.mjs';
7
7
  import '../vector/vector4.mjs';
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.js';
2
2
  import '../interval.js';
3
3
  import '../vector/vector2.js';
4
4
  export { L as LinearPolynomial, U as antiderivative, T as derivative, V as domain, J as fromPointSlope, K as fromPoints, I as fromVector, G as isLinearPolynomial, X as length, H as make, S as monotonicity, W as range, R as root, M as solve, O as solveInverse, P as toInverseSolver, N as toSolver } from '../shared/curvy.CkJRVnqj.js';
5
- import '../shared/curvy.CT38g_II.js';
5
+ import '../shared/curvy.Bf5TIk31.js';
6
6
  import '../vector/vector3.js';
7
7
  import '../vector/vector4.js';
@@ -1,5 +1,5 @@
1
- import { i as isLinearPolynomial$1, a as make$1, f as fromVector$1, d as fromPointSlope$1, e as fromPoints$1, s as solve$1, t as toSolver$1, c as solveInverse$1, g as toInverseSolver$1, m as monotonicity$1, h as derivative$1, j as antiderivative$1, k as domain$1, r as range$1, l as length$1 } from '../shared/curvy.DB7nQmVs.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
1
+ import { i as isLinearPolynomial$1, a as make$1, f as fromVector$1, d as fromPointSlope$1, e as fromPoints$1, s as solve$1, t as toSolver$1, c as solveInverse$1, g as toInverseSolver$1, m as monotonicity$1, h as derivative$1, j as antiderivative$1, k as domain$1, r as range$1, l as length$1 } from '../shared/curvy.O57gIOmy.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
3
  import '../interval.mjs';
4
4
 
5
5
  const isLinearPolynomial = isLinearPolynomial$1;
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.mjs';
2
2
  import '../interval.mjs';
3
3
  import '../vector/vector3.mjs';
4
4
  export { Q as QuadraticPolynomial, A as antiderivative, F as curvature, w as derivative, B as domain, y as extreme, o as fromVector, k as isQuadraticPolynomial, E as length, n as make, z as monotonicity, D as range, x as roots, p as solve, u as solveInverse, v as toInverseSolver, q as toSolver } from '../shared/curvy.DwHW5Fqt.mjs';
5
- import '../shared/curvy.CT38g_II.mjs';
5
+ import '../shared/curvy.Bf5TIk31.mjs';
6
6
  import '../vector/vector2.mjs';
7
7
  import '../vector/vector4.mjs';
@@ -2,6 +2,6 @@ import '../shared/curvy.BN-oFBsc.js';
2
2
  import '../interval.js';
3
3
  import '../vector/vector3.js';
4
4
  export { Q as QuadraticPolynomial, A as antiderivative, F as curvature, w as derivative, B as domain, y as extreme, o as fromVector, k as isQuadraticPolynomial, E as length, n as make, z as monotonicity, D as range, x as roots, p as solve, u as solveInverse, v as toInverseSolver, q as toSolver } from '../shared/curvy.CkJRVnqj.js';
5
- import '../shared/curvy.CT38g_II.js';
5
+ import '../shared/curvy.Bf5TIk31.js';
6
6
  import '../vector/vector2.js';
7
7
  import '../vector/vector4.js';
@@ -1,7 +1,7 @@
1
- import { i as isQuadraticPolynomial$1, m as make$1, f as fromVector$1, c as solve$1, t as toSolver$1, s as solveInverse$1, e as toInverseSolver$1, d as derivative$1, r as roots$1, h as extreme$1, b as monotonicity$1, j as antiderivative$1, k as domain$1, n as range$1, l as length$1, o as curvature$1 } from '../shared/curvy.D7MEXd5g.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
1
+ import { i as isQuadraticPolynomial$1, m as make$1, f as fromVector$1, c as solve$1, t as toSolver$1, s as solveInverse$1, e as toInverseSolver$1, d as derivative$1, r as roots$1, h as extreme$1, b as monotonicity$1, j as antiderivative$1, k as domain$1, n as range$1, l as length$1, o as curvature$1 } from '../shared/curvy.ZjG-q57I.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
3
  import '../interval.mjs';
4
- import '../shared/curvy.DB7nQmVs.mjs';
4
+ import '../shared/curvy.O57gIOmy.mjs';
5
5
 
6
6
  const isQuadraticPolynomial = isQuadraticPolynomial$1;
7
7
  const make = make$1;
@@ -1,4 +1,4 @@
1
- import { d as dual, r as round, P as Pipeable } from './curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from './curvy.DLOeble8.mjs';
2
2
 
3
3
  const Vector4TypeId = Symbol.for("curvy/vector4");
4
4
  class Vector4Impl extends Pipeable {
@@ -66,5 +66,9 @@ const hadamard = dual(
66
66
  2,
67
67
  (a, b) => make(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w)
68
68
  );
69
+ const scale = dual(
70
+ 2,
71
+ (v, s) => s === 1 ? v : make(v.x * s, v.y * s, v.z * s, v.w * s)
72
+ );
69
73
 
70
- export { magnitude as a, add as b, components as c, dot as d, subtract as e, hadamard as h, isVector4 as i, make as m, normalize as n, softmax as s };
74
+ export { magnitude as a, add as b, components as c, dot as d, subtract as e, scale as f, hadamard as h, isVector4 as i, make as m, normalize as n, softmax as s };
@@ -1,16 +1,14 @@
1
- import { d as dual, a as PRECISION, r as round, P as Pipeable } from './curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from './curvy.DLOeble8.mjs';
2
2
 
3
3
  const Vector2TypeId = Symbol.for("curvy/vector2");
4
4
  class Vector2Impl extends Pipeable {
5
5
  [Vector2TypeId] = Vector2TypeId;
6
6
  x;
7
7
  y;
8
- precision;
9
- constructor(v0 = 0, v1 = 0, precision = PRECISION) {
8
+ constructor(v0 = 0, v1 = 0) {
10
9
  super();
11
- this.x = round(v0, precision);
12
- this.y = round(v1, precision);
13
- this.precision = precision;
10
+ this.x = round(v0);
11
+ this.y = round(v1);
14
12
  }
15
13
  get [0]() {
16
14
  return this.x;
@@ -26,7 +24,7 @@ class Vector2Impl extends Pipeable {
26
24
  }
27
25
  }
28
26
  const isVector2 = (v) => typeof v === "object" && v !== null && Vector2TypeId in v;
29
- const make = (v0, v1 = v0, precision = PRECISION) => new Vector2Impl(v0, v1, precision);
27
+ const make = (v0, v1 = v0) => new Vector2Impl(v0, v1);
30
28
  const components = (v) => [v.x, v.y];
31
29
  const magnitude = (vector) => round(Math.hypot(vector.x, vector.y));
32
30
  const normalize = (vector) => {
@@ -45,5 +43,6 @@ const softmax = (v) => {
45
43
  const add = dual(2, (a, b) => make(a.x + b.x, a.y + b.y));
46
44
  const subtract = dual(2, (a, b) => make(a.x - b.x, a.y - b.y));
47
45
  const hadamard = dual(2, (a, b) => make(a.x * b.x, a.y * b.y));
46
+ const scale = dual(2, (v, s) => s === 1 ? v : make(v.x * s, v.y * s));
48
47
 
49
- export { magnitude as a, components as b, cross as c, dot as d, add as e, subtract as f, hadamard as h, isVector2 as i, make as m, normalize as n, softmax as s };
48
+ export { magnitude as a, components as b, cross as c, dot as d, add as e, subtract as f, scale as g, hadamard as h, isVector2 as i, make as m, normalize as n, softmax as s };
@@ -19,4 +19,4 @@ interface FourDimensional<T> extends ThreeDimensional<T> {
19
19
  readonly 3: T;
20
20
  }
21
21
 
22
- export type { FourDimensionalIndex as F, ThreeDimensionalIndex as T, FourDimensionalComponent as a, ThreeDimensionalComponent as b, TwoDimensionalIndex as c, TwoDimensionalComponent as d, TwoDimensional as e, FourDimensional as f, ThreeDimensional as g };
22
+ export type { FourDimensionalIndex as F, TwoDimensional as T, FourDimensionalComponent as a, ThreeDimensionalIndex as b, ThreeDimensionalComponent as c, TwoDimensionalIndex as d, TwoDimensionalComponent as e, FourDimensional as f, ThreeDimensional as g };
@@ -19,4 +19,4 @@ interface FourDimensional<T> extends ThreeDimensional<T> {
19
19
  readonly 3: T;
20
20
  }
21
21
 
22
- export type { FourDimensionalIndex as F, ThreeDimensionalIndex as T, FourDimensionalComponent as a, ThreeDimensionalComponent as b, TwoDimensionalIndex as c, TwoDimensionalComponent as d, TwoDimensional as e, FourDimensional as f, ThreeDimensional as g };
22
+ export type { FourDimensionalIndex as F, TwoDimensional as T, FourDimensionalComponent as a, ThreeDimensionalIndex as b, ThreeDimensionalComponent as c, TwoDimensionalIndex as d, TwoDimensionalComponent as e, FourDimensional as f, ThreeDimensional as g };
@@ -1,5 +1,5 @@
1
- import { i as invariant, d as dual, r as round, P as Pipeable } from './curvy.ChkqgKuv.mjs';
2
- import { m as make$1, d as dot } from './curvy.DOSsf40r.mjs';
1
+ import { i as invariant, d as dual, r as round, P as Pipeable } from './curvy.DLOeble8.mjs';
2
+ import { m as make$1, d as dot } from './curvy.BPOevbwG.mjs';
3
3
 
4
4
  function toIndex(input) {
5
5
  if (typeof input === "number") {
@@ -98,6 +98,14 @@ function round(value, precision = PRECISION) {
98
98
  }
99
99
  return result;
100
100
  }
101
+ function roundDown(value, precision = PRECISION) {
102
+ const scale = 10 ** precision;
103
+ const result = Math.floor(value * scale) / scale;
104
+ if (result === 0) {
105
+ return 0;
106
+ }
107
+ return result;
108
+ }
101
109
  dual(
102
110
  5,
103
111
  (x, x1, x2, y1, y2) => {
@@ -116,4 +124,4 @@ function invariant(condition, message) {
116
124
  }
117
125
  }
118
126
 
119
- export { Pipeable as P, PRECISION as a, dual as d, invariant as i, round as r };
127
+ export { Pipeable as P, roundDown as a, dual as d, invariant as i, round as r };
@@ -0,0 +1,55 @@
1
+ import { fromPolynomials } from '../curve/cubic2d.mjs';
2
+ import { vectorProductLeft } from '../matrix/matrix4x4.mjs';
3
+ import { fromVector } from '../polynomial/cubic.mjs';
4
+ import { make } from '../vector/vector4.mjs';
5
+
6
+ function* toCurves(points, matrix, stride) {
7
+ let p0;
8
+ let p1;
9
+ let p2;
10
+ let p3;
11
+ for (const point of points) {
12
+ if (p0 === void 0) {
13
+ p0 = point;
14
+ continue;
15
+ }
16
+ if (p1 === void 0) {
17
+ p1 = point;
18
+ continue;
19
+ }
20
+ if (p2 === void 0) {
21
+ p2 = point;
22
+ continue;
23
+ }
24
+ p3 = point;
25
+ yield fromPolynomials(
26
+ fromVector(
27
+ vectorProductLeft(
28
+ matrix,
29
+ make(p0.x, p1.x, p2.x, p3.x)
30
+ )
31
+ ),
32
+ fromVector(
33
+ vectorProductLeft(
34
+ matrix,
35
+ make(p0.y, p1.y, p2.y, p3.y)
36
+ )
37
+ )
38
+ );
39
+ if (stride === 1) {
40
+ p0 = p1;
41
+ p1 = p2;
42
+ p2 = p3;
43
+ } else if (stride === 2) {
44
+ p0 = p2;
45
+ p1 = p3;
46
+ p2 = void 0;
47
+ } else if (stride === 3) {
48
+ p0 = p3;
49
+ p1 = void 0;
50
+ p2 = void 0;
51
+ }
52
+ }
53
+ }
54
+
55
+ export { toCurves as t };
@@ -1,6 +1,6 @@
1
- import { o as toThreeDimensionalIndex, d as determinant$1, m as make$1 } from './curvy.DM6AiKbn.mjs';
2
- import { d as dual, r as round, i as invariant, P as Pipeable } from './curvy.ChkqgKuv.mjs';
3
- import { c as components, m as make$2, d as dot } from './curvy.D7bhnwZy.mjs';
1
+ import { o as toThreeDimensionalIndex, d as determinant$1, m as make$1 } from './curvy.BrrC9QVB.mjs';
2
+ import { d as dual, r as round, i as invariant, P as Pipeable } from './curvy.DLOeble8.mjs';
3
+ import { c as components, m as make$2, d as dot } from './curvy.DV4S13Cq.mjs';
4
4
 
5
5
  const Matrix3x3TypeId = Symbol.for("curvy/matrix3x3");
6
6
  class Matrix3x3Impl extends Pipeable {
@@ -1,4 +1,4 @@
1
- import { d as dual, r as round, P as Pipeable } from './curvy.ChkqgKuv.mjs';
1
+ import { d as dual, r as round, P as Pipeable } from './curvy.DLOeble8.mjs';
2
2
 
3
3
  const Vector3TypeId = Symbol.for("curvy/vector3");
4
4
  class Vector3Impl extends Pipeable {
@@ -48,5 +48,6 @@ const make = (v0, v1 = v0, v2 = v1) => new Vector3Impl(v0, v1, v2);
48
48
  const add = dual(2, (a, b) => make(a.x + b.x, a.y + b.y, a.z + b.z));
49
49
  const subtract = dual(2, (a, b) => make(a.x - b.x, a.y - b.y, a.z - b.z));
50
50
  const hadamard = dual(2, (a, b) => make(a.x * b.x, a.y * b.y, a.z * b.z));
51
+ const scale = dual(2, (v, s) => s === 1 ? v : make(v.x * s, v.y * s, v.z * s));
51
52
 
52
- export { magnitude as a, add as b, components as c, dot as d, subtract as e, hadamard as h, isVector3 as i, make as m, normalize as n, softmax as s };
53
+ export { magnitude as a, add as b, components as c, dot as d, subtract as e, scale as f, hadamard as h, isVector3 as i, make as m, normalize as n, softmax as s };
@@ -1,4 +1,4 @@
1
- import { P as Pipeable, r as round, d as dual } from './curvy.ChkqgKuv.mjs';
1
+ import { P as Pipeable, r as round, d as dual } from './curvy.DLOeble8.mjs';
2
2
  import { make as make$1, size } from '../interval.mjs';
3
3
 
4
4
  const QuadraticPolynomialTypeId = Symbol.for(