curvy 1.0.9 → 2.0.0-alpha.10

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 (204) hide show
  1. package/dist/characteristic/characteristic.d.ts +80 -0
  2. package/dist/characteristic/index.d.ts +1 -0
  3. package/dist/characteristic/index.mjs +2 -0
  4. package/dist/curve/cubic2d.d.ts +133 -27
  5. package/dist/curve/cubic2d.internal.d.ts +2 -0
  6. package/dist/curve/index.d.ts +12 -0
  7. package/dist/curve/index.mjs +2 -0
  8. package/dist/curve/linear2d.d.ts +125 -24
  9. package/dist/curve/linear2d.internal.d.ts +2 -0
  10. package/dist/curve/quadratic2d.d.ts +134 -28
  11. package/dist/curve/quadratic2d.internal.d.ts +2 -0
  12. package/dist/curve/rationalCubic2d.d.ts +241 -0
  13. package/dist/curve/rationalCubic2d.internal.d.ts +2 -0
  14. package/dist/dimensions.d.ts +23 -0
  15. package/dist/interval/index.d.ts +6 -0
  16. package/dist/interval/index.mjs +3 -0
  17. package/dist/interval/interval.d.ts +525 -0
  18. package/dist/interval/interval.internal.d.ts +1 -0
  19. package/dist/interval/interval2d.d.ts +204 -0
  20. package/dist/interval/interval2d.internal.d.ts +2 -0
  21. package/dist/length.d.ts +32 -0
  22. package/dist/matrix/index.d.ts +9 -0
  23. package/dist/matrix/index.mjs +267 -0
  24. package/dist/matrix/index.mjs.map +1 -0
  25. package/dist/matrix/matrix2x2.d.ts +44 -29
  26. package/dist/matrix/matrix2x2.internal.d.ts +2 -0
  27. package/dist/matrix/matrix3x3.d.ts +64 -38
  28. package/dist/matrix/matrix3x3.internal.d.ts +4 -0
  29. package/dist/matrix/matrix4x4.d.ts +92 -34
  30. package/dist/matrix/matrix4x4.internal.d.ts +2 -0
  31. package/dist/number.d.ts +276 -0
  32. package/dist/number.mjs +140 -0
  33. package/dist/number.mjs.map +1 -0
  34. package/dist/path/cubic2d.d.ts +192 -25
  35. package/dist/path/cubic2d.internal.d.ts +2 -0
  36. package/dist/path/index.d.ts +12 -0
  37. package/dist/path/index.mjs +734 -0
  38. package/dist/path/index.mjs.map +1 -0
  39. package/dist/path/linear2d.d.ts +175 -25
  40. package/dist/path/linear2d.internal.d.ts +2 -0
  41. package/dist/path/quadratic2d.d.ts +165 -26
  42. package/dist/path/quadratic2d.internal.d.ts +2 -0
  43. package/dist/path/rationalCubic2d.d.ts +116 -0
  44. package/dist/path/rationalCubic2d.internal.d.ts +2 -0
  45. package/dist/path/traits.d.ts +95 -0
  46. package/dist/polynomial/cubic.d.ts +377 -7
  47. package/dist/polynomial/cubic.internal.circular.d.ts +2 -0
  48. package/dist/polynomial/cubic.internal.d.ts +1 -0
  49. package/dist/polynomial/index.d.ts +9 -0
  50. package/dist/polynomial/index.mjs +3 -0
  51. package/dist/polynomial/linear.d.ts +317 -7
  52. package/dist/polynomial/linear.internal.d.ts +2 -0
  53. package/dist/polynomial/monotonicity.d.ts +3 -0
  54. package/dist/polynomial/quadratic.d.ts +371 -7
  55. package/dist/polynomial/quadratic.internal.circular.d.ts +2 -0
  56. package/dist/polynomial/quadratic.internal.d.ts +1 -0
  57. package/dist/polynomial/traits.d.ts +56 -0
  58. package/dist/shared/characteristic-B0VEB_OA.mjs +104 -0
  59. package/dist/shared/characteristic-B0VEB_OA.mjs.map +1 -0
  60. package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
  61. package/dist/shared/cubic-NEn7E6V_.mjs +575 -0
  62. package/dist/shared/cubic-NEn7E6V_.mjs.map +1 -0
  63. package/dist/shared/interval-CqC3ZIqj.mjs +460 -0
  64. package/dist/shared/interval-CqC3ZIqj.mjs.map +1 -0
  65. package/dist/shared/interval2d-C0eduE-V.mjs +149 -0
  66. package/dist/shared/interval2d-C0eduE-V.mjs.map +1 -0
  67. package/dist/shared/matrix4x4-BWmf4lZM.mjs +499 -0
  68. package/dist/shared/matrix4x4-BWmf4lZM.mjs.map +1 -0
  69. package/dist/shared/quadratic-Dlxqo2V1.mjs +348 -0
  70. package/dist/shared/quadratic-Dlxqo2V1.mjs.map +1 -0
  71. package/dist/shared/rationalCubic2d-3S5K69Jy.mjs +909 -0
  72. package/dist/shared/rationalCubic2d-3S5K69Jy.mjs.map +1 -0
  73. package/dist/shared/rationalCubic2d-CJY-feGw.mjs +508 -0
  74. package/dist/shared/rationalCubic2d-CJY-feGw.mjs.map +1 -0
  75. package/dist/shared/solution-UKGK826h.mjs +352 -0
  76. package/dist/shared/solution-UKGK826h.mjs.map +1 -0
  77. package/dist/shared/vector2-CSkaMXvp.mjs +205 -0
  78. package/dist/shared/vector2-CSkaMXvp.mjs.map +1 -0
  79. package/dist/shared/vector2.internal-DP1nTBdS.mjs +141 -0
  80. package/dist/shared/vector2.internal-DP1nTBdS.mjs.map +1 -0
  81. package/dist/shared/vector3-CR2LPV03.mjs +226 -0
  82. package/dist/shared/vector3-CR2LPV03.mjs.map +1 -0
  83. package/dist/shared/vector4-PO_7EYd-.mjs +171 -0
  84. package/dist/shared/vector4-PO_7EYd-.mjs.map +1 -0
  85. package/dist/shared/vector4.internal-BJ1QN2Ck.mjs +246 -0
  86. package/dist/shared/vector4.internal-BJ1QN2Ck.mjs.map +1 -0
  87. package/dist/solution/index.d.ts +1 -0
  88. package/dist/solution/index.mjs +2 -0
  89. package/dist/solution/solution.d.ts +264 -0
  90. package/dist/solution/solution.internal.d.ts +2 -0
  91. package/dist/splines/basis2d.d.ts +26 -38
  92. package/dist/splines/basis2d.internal.d.ts +2 -0
  93. package/dist/splines/bezier2d.d.ts +61 -45
  94. package/dist/splines/bezier2d.internal.d.ts +2 -0
  95. package/dist/splines/cardinal2d.d.ts +179 -88
  96. package/dist/splines/cardinal2d.internal.d.ts +2 -0
  97. package/dist/splines/hermite2d.d.ts +25 -36
  98. package/dist/splines/hermite2d.internal.d.ts +2 -0
  99. package/dist/splines/index.d.ts +15 -0
  100. package/dist/splines/index.mjs +946 -0
  101. package/dist/splines/index.mjs.map +1 -0
  102. package/dist/splines/rationalBezier2d.d.ts +144 -0
  103. package/dist/splines/rationalBezier2d.internal.d.ts +2 -0
  104. package/dist/splines/util.d.ts +5 -0
  105. package/dist/utils.d.ts +54 -186
  106. package/dist/utils.mjs +88 -52
  107. package/dist/utils.mjs.map +1 -1
  108. package/dist/vector/index.d.ts +9 -0
  109. package/dist/vector/index.mjs +4 -0
  110. package/dist/vector/vector2.d.ts +238 -33
  111. package/dist/vector/vector2.internal.d.ts +4 -0
  112. package/dist/vector/vector3.d.ts +198 -41
  113. package/dist/vector/vector3.internal.d.ts +2 -0
  114. package/dist/vector/vector4.d.ts +260 -23
  115. package/dist/vector/vector4.internal.d.ts +2 -0
  116. package/package.json +48 -91
  117. package/dist/curve/cubic2d.d.mts +0 -109
  118. package/dist/curve/cubic2d.mjs +0 -80
  119. package/dist/curve/cubic2d.mjs.map +0 -1
  120. package/dist/curve/linear2d.d.mts +0 -94
  121. package/dist/curve/linear2d.mjs +0 -46
  122. package/dist/curve/linear2d.mjs.map +0 -1
  123. package/dist/curve/quadratic2d.d.mts +0 -117
  124. package/dist/curve/quadratic2d.mjs +0 -82
  125. package/dist/curve/quadratic2d.mjs.map +0 -1
  126. package/dist/interval.d.mts +0 -251
  127. package/dist/interval.d.ts +0 -251
  128. package/dist/interval.mjs +0 -86
  129. package/dist/interval.mjs.map +0 -1
  130. package/dist/matrix/matrix2x2.d.mts +0 -320
  131. package/dist/matrix/matrix2x2.mjs +0 -25
  132. package/dist/matrix/matrix2x2.mjs.map +0 -1
  133. package/dist/matrix/matrix3x3.d.mts +0 -370
  134. package/dist/matrix/matrix3x3.mjs +0 -28
  135. package/dist/matrix/matrix3x3.mjs.map +0 -1
  136. package/dist/matrix/matrix4x4.d.mts +0 -381
  137. package/dist/matrix/matrix4x4.mjs +0 -178
  138. package/dist/matrix/matrix4x4.mjs.map +0 -1
  139. package/dist/path/cubic2d.d.mts +0 -95
  140. package/dist/path/cubic2d.mjs +0 -60
  141. package/dist/path/cubic2d.mjs.map +0 -1
  142. package/dist/path/linear2d.d.mts +0 -95
  143. package/dist/path/linear2d.mjs +0 -53
  144. package/dist/path/linear2d.mjs.map +0 -1
  145. package/dist/path/quadratic2d.d.mts +0 -95
  146. package/dist/path/quadratic2d.mjs +0 -57
  147. package/dist/path/quadratic2d.mjs.map +0 -1
  148. package/dist/pipe.d.mts +0 -58
  149. package/dist/pipe.d.ts +0 -58
  150. package/dist/pipe.mjs +0 -92
  151. package/dist/pipe.mjs.map +0 -1
  152. package/dist/polynomial/cubic.d.mts +0 -7
  153. package/dist/polynomial/cubic.mjs +0 -133
  154. package/dist/polynomial/cubic.mjs.map +0 -1
  155. package/dist/polynomial/linear.d.mts +0 -7
  156. package/dist/polynomial/linear.mjs +0 -24
  157. package/dist/polynomial/linear.mjs.map +0 -1
  158. package/dist/polynomial/quadratic.d.mts +0 -7
  159. package/dist/polynomial/quadratic.mjs +0 -27
  160. package/dist/polynomial/quadratic.mjs.map +0 -1
  161. package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
  162. package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
  163. package/dist/shared/curvy.BkkW8Tx9.mjs +0 -102
  164. package/dist/shared/curvy.BkkW8Tx9.mjs.map +0 -1
  165. package/dist/shared/curvy.BxdGW9he.mjs +0 -116
  166. package/dist/shared/curvy.BxdGW9he.mjs.map +0 -1
  167. package/dist/shared/curvy.C_sCeg9J.mjs +0 -66
  168. package/dist/shared/curvy.C_sCeg9J.mjs.map +0 -1
  169. package/dist/shared/curvy.Cg8lZVUz.d.ts +0 -688
  170. package/dist/shared/curvy.DCt1gGII.mjs +0 -147
  171. package/dist/shared/curvy.DCt1gGII.mjs.map +0 -1
  172. package/dist/shared/curvy.DJ4xO0al.mjs +0 -63
  173. package/dist/shared/curvy.DJ4xO0al.mjs.map +0 -1
  174. package/dist/shared/curvy.DmVFTi0N.mjs +0 -35
  175. package/dist/shared/curvy.DmVFTi0N.mjs.map +0 -1
  176. package/dist/shared/curvy.FDaj5rlj.d.mts +0 -688
  177. package/dist/shared/curvy.lktriTpx.mjs +0 -101
  178. package/dist/shared/curvy.lktriTpx.mjs.map +0 -1
  179. package/dist/shared/curvy.mLFprrGm.mjs +0 -85
  180. package/dist/shared/curvy.mLFprrGm.mjs.map +0 -1
  181. package/dist/shared/curvy.r6f1j287.mjs +0 -76
  182. package/dist/shared/curvy.r6f1j287.mjs.map +0 -1
  183. package/dist/splines/basis2d.d.mts +0 -130
  184. package/dist/splines/basis2d.mjs +0 -90
  185. package/dist/splines/basis2d.mjs.map +0 -1
  186. package/dist/splines/bezier2d.d.mts +0 -182
  187. package/dist/splines/bezier2d.mjs +0 -23
  188. package/dist/splines/bezier2d.mjs.map +0 -1
  189. package/dist/splines/cardinal2d.d.mts +0 -178
  190. package/dist/splines/cardinal2d.mjs +0 -114
  191. package/dist/splines/cardinal2d.mjs.map +0 -1
  192. package/dist/splines/hermite2d.d.mts +0 -124
  193. package/dist/splines/hermite2d.mjs +0 -63
  194. package/dist/splines/hermite2d.mjs.map +0 -1
  195. package/dist/utils.d.mts +0 -205
  196. package/dist/vector/vector2.d.mts +0 -324
  197. package/dist/vector/vector2.mjs +0 -30
  198. package/dist/vector/vector2.mjs.map +0 -1
  199. package/dist/vector/vector3.d.mts +0 -417
  200. package/dist/vector/vector3.mjs +0 -38
  201. package/dist/vector/vector3.mjs.map +0 -1
  202. package/dist/vector/vector4.d.mts +0 -205
  203. package/dist/vector/vector4.mjs +0 -20
  204. package/dist/vector/vector4.mjs.map +0 -1
@@ -1,80 +0,0 @@
1
- import { size, scaleShift, biunit } from '../interval.mjs';
2
- 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';
3
- import { dual, Pipeable } from '../pipe.mjs';
4
- import { make, solve as solve$2, derivative as derivative$2 } from '../polynomial/cubic.mjs';
5
- import { make as make$2 } from '../polynomial/quadratic.mjs';
6
- import { round } from '../utils.mjs';
7
- import { make as make$1, magnitude, cross } from '../vector/vector2.mjs';
8
- import { solve as solve$4 } from './linear2d.mjs';
9
- import { length as length$2, fromPolynomials as fromPolynomials$2, solve as solve$3, derivative as derivative$1 } from './quadratic2d.mjs';
10
- import '../shared/curvy.BxdGW9he.mjs';
11
- import '../shared/curvy.r6f1j287.mjs';
12
- import '../shared/curvy.DJ4xO0al.mjs';
13
- import '../polynomial/linear.mjs';
14
-
15
- var _a, _b;
16
- const CubicCurve2dTypeId = Symbol("curvy/curve/cubic2d");
17
- class CubicCurve2dImpl extends (_b = Pipeable, _a = CubicCurve2dTypeId, _b) {
18
- constructor(c0, c1) {
19
- super();
20
- this[_a] = CubicCurve2dTypeId;
21
- this.x = c0;
22
- this.y = c1;
23
- }
24
- get [0]() {
25
- return this.x;
26
- }
27
- get [1]() {
28
- return this.y;
29
- }
30
- }
31
- const fromPolynomials$1 = (c0, c1) => new CubicCurve2dImpl(c0, c1);
32
- const fromPoints$1 = (p0, p1, p2, p3) => new CubicCurve2dImpl(
33
- make(p0.x, p1.x, p2.x, p3.x),
34
- make(p0.y, p1.y, p2.y, p3.y)
35
- );
36
- const isCubicCurve2d$1 = (c) => typeof c === "object" && c !== null && CubicCurve2dTypeId in c;
37
- const solve$1 = dual(
38
- 2,
39
- (c, t) => make$1(solve$2(c.x, t), solve$2(c.y, t))
40
- );
41
- const derivative = (c) => fromPolynomials$2(derivative$2(c.x), derivative$2(c.y));
42
- const length$1 = dual(2, (c, i) => {
43
- if (size(i) === 0) {
44
- return 0;
45
- }
46
- if (c.x.c3 === 0 && c.y.c3 === 0) {
47
- return length$2(
48
- fromPolynomials$2(
49
- make$2(c.x.c0, c.x.c1, c.x.c2),
50
- make$2(c.y.c0, c.y.c1, c.y.c2)
51
- ),
52
- i
53
- );
54
- }
55
- const d = derivative(c);
56
- const { scale, shift } = scaleShift(biunit, i);
57
- return round(
58
- (GL32_W0 * magnitude(solve$3(d, shift + scale * -0.9972638618494816)) + GL32_W0 * magnitude(solve$3(d, shift + scale * GL32_X0)) + GL32_W1 * magnitude(solve$3(d, shift + scale * -0.9856115115452684)) + GL32_W1 * magnitude(solve$3(d, shift + scale * GL32_X1)) + GL32_W2 * magnitude(solve$3(d, shift + scale * -0.9647622555875064)) + GL32_W2 * magnitude(solve$3(d, shift + scale * GL32_X2)) + GL32_W3 * magnitude(solve$3(d, shift + scale * -0.9349060759377397)) + GL32_W3 * magnitude(solve$3(d, shift + scale * GL32_X3)) + GL32_W4 * magnitude(solve$3(d, shift + scale * -0.8963211557660521)) + GL32_W4 * magnitude(solve$3(d, shift + scale * GL32_X4)) + GL32_W5 * magnitude(solve$3(d, shift + scale * -0.84936761373257)) + GL32_W5 * magnitude(solve$3(d, shift + scale * GL32_X5)) + GL32_W6 * magnitude(solve$3(d, shift + scale * -0.7944837959679424)) + GL32_W6 * magnitude(solve$3(d, shift + scale * GL32_X6)) + GL32_W7 * magnitude(solve$3(d, shift + scale * -0.7321821187402897)) + GL32_W7 * magnitude(solve$3(d, shift + scale * GL32_X7)) + GL32_W8 * magnitude(solve$3(d, shift + scale * -0.6630442669302152)) + GL32_W8 * magnitude(solve$3(d, shift + scale * GL32_X8)) + GL32_W9 * magnitude(solve$3(d, shift + scale * -0.5877157572407623)) + GL32_W9 * magnitude(solve$3(d, shift + scale * GL32_X9)) + GL32_W10 * magnitude(solve$3(d, shift + scale * -0.5068999089322294)) + GL32_W10 * magnitude(solve$3(d, shift + scale * GL32_X10)) + GL32_W11 * magnitude(solve$3(d, shift + scale * -0.42135127613063533)) + GL32_W11 * magnitude(solve$3(d, shift + scale * GL32_X11)) + GL32_W12 * magnitude(solve$3(d, shift + scale * -0.33186860228212767)) + GL32_W12 * magnitude(solve$3(d, shift + scale * GL32_X12)) + GL32_W13 * magnitude(solve$3(d, shift + scale * -0.23928736225213706)) + GL32_W13 * magnitude(solve$3(d, shift + scale * GL32_X13)) + GL32_W14 * magnitude(solve$3(d, shift + scale * -0.1444719615827965)) + GL32_W14 * magnitude(solve$3(d, shift + scale * GL32_X14)) + GL32_W15 * magnitude(solve$3(d, shift + scale * -0.04830766568773831)) + GL32_W15 * magnitude(solve$3(d, shift + scale * GL32_X15))) * scale
59
- );
60
- });
61
- const curvature$1 = dual(2, (c, t) => {
62
- const d = derivative(c);
63
- const v = solve$3(d, t);
64
- const a = solve$4(derivative$1(d), t);
65
- const vMag = magnitude(v);
66
- if (vMag === 0) {
67
- return 0;
68
- }
69
- return round(Math.abs(cross(v, a)) / vMag ** 3);
70
- });
71
-
72
- const fromPolynomials = fromPolynomials$1;
73
- const fromPoints = fromPoints$1;
74
- const isCubicCurve2d = isCubicCurve2d$1;
75
- const solve = solve$1;
76
- const length = length$1;
77
- const curvature = curvature$1;
78
-
79
- export { curvature, fromPoints, fromPolynomials, isCubicCurve2d, length, solve };
80
- //# sourceMappingURL=cubic2d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cubic2d.mjs","sources":["../../src/curve/cubic2d.internal.ts","../../src/curve/cubic2d.ts"],"sourcesContent":["import * as Interval from '../interval'\nimport {\n GL32_W0,\n GL32_W1,\n GL32_W2,\n GL32_W3,\n GL32_W4,\n GL32_W5,\n GL32_W6,\n GL32_W7,\n GL32_W8,\n GL32_W9,\n GL32_W10,\n GL32_W11,\n GL32_W12,\n GL32_W13,\n GL32_W14,\n GL32_W15,\n GL32_X0,\n GL32_X1,\n GL32_X2,\n GL32_X3,\n GL32_X4,\n GL32_X5,\n GL32_X6,\n GL32_X7,\n GL32_X8,\n GL32_X9,\n GL32_X10,\n GL32_X11,\n GL32_X12,\n GL32_X13,\n GL32_X14,\n GL32_X15,\n} from '../length'\nimport { Pipeable } from '../pipe'\nimport { dual } from '../pipe'\nimport * as CubicPolynomial from '../polynomial/cubic'\nimport * as QuadraticPolynomial from '../polynomial/quadratic'\nimport { round } from '../utils'\nimport * as Vector2 from '../vector/vector2'\nimport type { CubicCurve2d } from './cubic2d'\nimport * as LinearCurve2d from './linear2d'\nimport * as QuadraticCurve2d from './quadratic2d'\n\nexport const CubicCurve2dTypeId: unique symbol = Symbol('curvy/curve/cubic2d')\nexport type CubicCurve2dTypeId = typeof CubicCurve2dTypeId\n\nexport class CubicCurve2dImpl extends Pipeable implements CubicCurve2d {\n readonly [CubicCurve2dTypeId]: CubicCurve2dTypeId = CubicCurve2dTypeId\n\n readonly x: CubicPolynomial.CubicPolynomial\n readonly y: CubicPolynomial.CubicPolynomial\n\n constructor(c0: CubicPolynomial.CubicPolynomial, c1: CubicPolynomial.CubicPolynomial) {\n super()\n this.x = c0\n this.y = c1\n }\n\n get [0]() {\n return this.x\n }\n\n get [1]() {\n return this.y\n }\n}\n\nexport const fromPolynomials: (\n c0: CubicPolynomial.CubicPolynomial,\n c1: CubicPolynomial.CubicPolynomial,\n) => CubicCurve2d = (c0, c1) => new CubicCurve2dImpl(c0, c1)\n\nexport const fromPoints: (\n p0: Vector2.Vector2,\n p1: Vector2.Vector2,\n p2: Vector2.Vector2,\n p3: Vector2.Vector2,\n) => CubicCurve2d = (p0, p1, p2, p3) =>\n new CubicCurve2dImpl(\n CubicPolynomial.make(p0.x, p1.x, p2.x, p3.x),\n CubicPolynomial.make(p0.y, p1.y, p2.y, p3.y),\n )\n\nexport const isCubicCurve2d = (c: unknown): c is CubicCurve2d =>\n typeof c === 'object' && c !== null && CubicCurve2dTypeId in c\n\nexport const solve = dual<\n (t: number) => (c: CubicCurve2d) => Vector2.Vector2,\n (c: CubicCurve2d, t: number) => Vector2.Vector2\n>(2, (c: CubicCurve2d, t: number) =>\n Vector2.make(CubicPolynomial.solve(c.x, t), CubicPolynomial.solve(c.y, t)),\n)\n\nexport const derivative = (c: CubicCurve2d) =>\n QuadraticCurve2d.fromPolynomials(CubicPolynomial.derivative(c.x), CubicPolynomial.derivative(c.y))\n\nexport const length = dual(2, (c: CubicCurve2d, i: Interval.Interval) => {\n if (Interval.size(i) === 0) {\n return 0\n }\n\n if (c.x.c3 === 0 && c.y.c3 === 0) {\n return QuadraticCurve2d.length(\n QuadraticCurve2d.fromPolynomials(\n QuadraticPolynomial.make(c.x.c0, c.x.c1, c.x.c2),\n QuadraticPolynomial.make(c.y.c0, c.y.c1, c.y.c2),\n ),\n i,\n )\n }\n\n const d = derivative(c)\n\n const { scale, shift } = Interval.scaleShift(Interval.biunit, i)\n\n return round(\n (GL32_W0 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X0)) +\n GL32_W0 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X0)) +\n GL32_W1 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X1)) +\n GL32_W1 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X1)) +\n GL32_W2 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X2)) +\n GL32_W2 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X2)) +\n GL32_W3 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X3)) +\n GL32_W3 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X3)) +\n GL32_W4 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X4)) +\n GL32_W4 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X4)) +\n GL32_W5 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X5)) +\n GL32_W5 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X5)) +\n GL32_W6 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X6)) +\n GL32_W6 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X6)) +\n GL32_W7 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X7)) +\n GL32_W7 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X7)) +\n GL32_W8 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X8)) +\n GL32_W8 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X8)) +\n GL32_W9 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X9)) +\n GL32_W9 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X9)) +\n GL32_W10 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X10)) +\n GL32_W10 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X10)) +\n GL32_W11 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X11)) +\n GL32_W11 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X11)) +\n GL32_W12 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X12)) +\n GL32_W12 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X12)) +\n GL32_W13 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X13)) +\n GL32_W13 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X13)) +\n GL32_W14 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X14)) +\n GL32_W14 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X14)) +\n GL32_W15 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * -GL32_X15)) +\n GL32_W15 * Vector2.magnitude(QuadraticCurve2d.solve(d, shift + scale * GL32_X15))) *\n scale,\n )\n})\n\nexport const curvature = dual(2, (c: CubicCurve2d, t: number) => {\n const d = derivative(c)\n\n const v = QuadraticCurve2d.solve(d, t)\n const a = LinearCurve2d.solve(QuadraticCurve2d.derivative(d), t)\n\n const vMag = Vector2.magnitude(v)\n\n if (vMag === 0) {\n return 0\n }\n\n return round(Math.abs(Vector2.cross(v, a)) / vMag ** 3)\n})\n","import type { TwoDimensional } from '../dimensions'\nimport type { Interval } from '../interval'\nimport type { Pipeable } from '../pipe'\nimport type { CubicPolynomial } from '../polynomial/cubic'\nimport type { Vector2 } from '../vector/vector2'\nimport type { CubicCurve2dTypeId } from './cubic2d.internal'\nimport * as internal from './cubic2d.internal'\n\n/**\n * A cubic curve in 2D space.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface CubicCurve2d extends Pipeable, TwoDimensional<CubicPolynomial> {\n readonly [CubicCurve2dTypeId]: CubicCurve2dTypeId\n}\n\n/**\n * Creates a new `CubicCurve2d` instance from polynomial parameters.\n *\n * @param x - The x polynomial.\n * @param y - The y polynomial.\n * @returns A new `CubicCurve2d` instance.\n * @since 1.0.0\n */\nexport const fromPolynomials: (x: CubicPolynomial, y: CubicPolynomial) => CubicCurve2d =\n internal.fromPolynomials\n\n/**\n * Creates a new `CubicCurve2d` instance from pairs of coefficients.\n *\n * @param p0 - The x^0 coefficients for the x and y polynomials.\n * @param p1 - The x^1 coefficients for the x and y polynomials.\n * @param p2 - The x^2 coefficients for the x and y polynomials.\n * @param p3 - The x^3 coefficients for the x and y polynomials.\n * @returns A new `CubicCurve2d` instance.\n * @since 1.0.0\n */\nexport const fromPoints: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => CubicCurve2d =\n internal.fromPoints\n\n/**\n * Checks if a value is a `CubicCurve2d`.\n *\n * @param c - The value to check.\n * @returns `true` if the value is a `CubicCurve2d`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isCubicCurve2d: (c: unknown) => c is CubicCurve2d = internal.isCubicCurve2d\n\nexport const solve: {\n /**\n * Solves the cubic curve for a given parameter t.\n *\n * @param t - The parameter value.\n * @returns A function that takes a cubic curve and returns the point on the curve at parameter t.\n * @since 1.0.0\n */\n (t: number): (c: CubicCurve2d) => Vector2\n /**\n * Solves the cubic curve for a given parameter t.\n *\n * @param c - The cubic curve to solve.\n * @param t - The parameter value.\n * @returns The point on the curve at parameter t.\n * @since 1.0.0\n */\n (c: CubicCurve2d, t: number): Vector2\n} = internal.solve\n\nexport const length: {\n /**\n * Calculates (approximates) the length of a cubic curve.\n *\n * @param c - The cubic curve to calculate the length of.\n * @param i - The interval over which to calculate the length.\n * @returns The length of the cubic curve.\n * @since 1.0.0\n */\n (c: CubicCurve2d, i: Interval): number\n /**\n * Calculates (approximates) the length of a cubic curve.\n *\n * @param i - The interval over which to calculate the length.\n * @returns A function that takes a cubic curve and returns the length of the cubic curve.\n * @since 1.0.0\n */\n (i: Interval): (c: CubicCurve2d) => number\n} = internal.length\n\nexport const curvature: {\n /**\n * Calculates the curvature of a cubic curve at a given parameter.\n *\n * @param c - The cubic curve to calculate the curvature for.\n * @param t - The parameter value.\n * @returns The curvature of the cubic curve at parameter t.\n * @since 1.0.0\n */\n (c: CubicCurve2d, t: number): number\n /**\n * Calculates the curvature of a cubic curve at a given parameter.\n *\n * @param t - The parameter value.\n * @returns A function that takes a cubic curve and returns the curvature of the cubic curve at parameter t.\n * @since 1.0.0\n */\n (t: number): (c: CubicCurve2d) => number\n} = internal.curvature\n"],"names":["fromPolynomials","fromPoints","CubicPolynomial.make","isCubicCurve2d","solve","Vector2.make","CubicPolynomial.solve","QuadraticCurve2d.fromPolynomials","CubicPolynomial.derivative","length","Interval.size","QuadraticCurve2d.length","QuadraticPolynomial.make","Interval.scaleShift","Interval.biunit","Vector2.magnitude","QuadraticCurve2d.solve","curvature","LinearCurve2d.solve","QuadraticCurve2d.derivative","Vector2.cross","internal.fromPolynomials","internal.fromPoints","internal.isCubicCurve2d","internal.solve","internal.length","internal.curvature"],"mappings":";;;;;;;;;;;;;;AAAA,IAAA,EAAA,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,CAAC,CAAA,GAChF,WAAWD,SAAQ,CAAUC,OAAuB,CAAA,CAAA,EAAG,QAAQ,KAAQ,GAAA,oBAAS,CAAC,CAAA,GACjF,WAAWD,SAAQ,CAAUC,OAAuB,CAAA,CAAA,EAAG,QAAQ,KAAQ,GAAA,QAAQ,CAAC,CAChF,IAAA;AAAA,GACJ;AACF,CAAC,CAAA;AAEM,MAAMC,WAAY,GAAA,IAAA,CAAK,CAAG,EAAA,CAAC,GAAiB,CAAc,KAAA;AAC/D,EAAM,MAAA,CAAA,GAAI,WAAW,CAAC,CAAA;AAEtB,EAAA,MAAM,CAAI,GAAAD,OAAuB,CAAA,CAAA,EAAG,CAAC,CAAA;AACrC,EAAA,MAAM,IAAIE,OAAc,CAAMC,YAA4B,CAAA,CAAC,GAAG,CAAC,CAAA;AAE/D,EAAM,MAAA,IAAA,GAAOJ,SAAQ,CAAU,CAAC,CAAA;AAEhC,EAAA,IAAI,SAAS,CAAG,EAAA;AACd,IAAO,OAAA,CAAA;AAAA;AAGT,EAAO,OAAA,KAAA,CAAM,IAAK,CAAA,GAAA,CAAIK,KAAQ,CAAM,GAAG,CAAC,CAAC,CAAI,GAAA,IAAA,IAAQ,CAAC,CAAA;AACxD,CAAC,CAAA;;AC5IM,MAAM,kBACXC;AAYK,MAAM,aACXC;AASK,MAAM,iBAAoDC;AAE1D,MAAM,QAkBTC;AAEG,MAAM,SAkBTC;AAEG,MAAM,YAkBTC;;;;"}
@@ -1,94 +0,0 @@
1
- import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
- import { Interval } from '../interval.mjs';
3
- import { Pipeable } from '../pipe.mjs';
4
- import { L as LinearPolynomial } from '../shared/curvy.FDaj5rlj.mjs';
5
- import { Vector2 } from '../vector/vector2.mjs';
6
- import '../vector/vector3.mjs';
7
- import '../vector/vector4.mjs';
8
-
9
- declare const LinearCurve2dTypeId: unique symbol;
10
- type LinearCurve2dTypeId = typeof LinearCurve2dTypeId;
11
-
12
- /**
13
- * A linear curve in 2D space.
14
- *
15
- * All fields are readonly and immutable, and all operations create new instances.
16
- *
17
- * @since 1.0.0
18
- */
19
- interface LinearCurve2d extends Pipeable, TwoDimensional<LinearPolynomial> {
20
- readonly [LinearCurve2dTypeId]: LinearCurve2dTypeId;
21
- }
22
- /**
23
- * Creates a new `LinearCurve2d` instance from polynomial parameters.
24
- *
25
- * @param x - The x polynomial.
26
- * @param y - The y polynomial.
27
- * @returns A new `LinearCurve2d` instance.
28
- * @since 1.0.0
29
- */
30
- declare const fromPolynomials: (x: LinearPolynomial, y: LinearPolynomial) => LinearCurve2d;
31
- /**
32
- * Creates a new `LinearCurve2d` instance from pairs of coefficients.
33
- *
34
- * @param p0 - The x^0 coefficients for the x and y polynomials.
35
- * @param p1 - The x^1 coefficients for the x and y polynomials.
36
- */
37
- declare const fromPoints: (p0: Vector2, p1: Vector2) => LinearCurve2d;
38
- /**
39
- * Checks if a value is a `LinearCurve2d`.
40
- *
41
- * @param c - The value to check.
42
- * @returns `true` if the value is a `LinearCurve2d`, `false` otherwise.
43
- * @since 1.0.0
44
- */
45
- declare const isLinearCurve2d: (c: unknown) => c is LinearCurve2d;
46
- /**
47
- * Gets the derivative of a linear curve as a vector
48
- *
49
- * @param c - The linear curve to get the derivative of.
50
- * @returns The derivative of the linear curve as a vector.
51
- * @since 1.0.0
52
- */
53
- declare const derivative: (c: LinearCurve2d) => Vector2;
54
- declare const solve: {
55
- /**
56
- * Solves the linear curve for a given parameter t.
57
- *
58
- * @param t - The parameter value.
59
- * @returns A function that takes a linear curve and returns the point on the curve at parameter t.
60
- * @since 1.0.0
61
- */
62
- (t: number): (c: LinearCurve2d) => Vector2;
63
- /**
64
- * Solves the linear curve for a given parameter t.
65
- *
66
- * @param c - The linear curve to solve.
67
- * @param t - The parameter value.
68
- * @returns The point on the curve at parameter t.
69
- * @since 1.0.0
70
- */
71
- (c: LinearCurve2d, t: number): Vector2;
72
- };
73
- declare const length: {
74
- /**
75
- * Calculates (approximates) the length of a linear curve.
76
- *
77
- * @param c - The linear curve to calculate the length of.
78
- * @param i - The interval to calculate the length over.
79
- * @returns The length of the linear curve over the given interval.
80
- * @since 1.0.0
81
- */
82
- (c: LinearCurve2d, i: Interval): number;
83
- /**
84
- * Calculates (approximates) the length of a linear curve.
85
- *
86
- * @param i - The interval to calculate the length over.
87
- * @returns A function that takes a linear curve and returns the length of the linear curve over the given interval.
88
- * @since 1.0.0
89
- */
90
- (i: Interval): (c: LinearCurve2d) => number;
91
- };
92
-
93
- export { derivative, fromPoints, fromPolynomials, isLinearCurve2d, length, solve };
94
- export type { LinearCurve2d };
@@ -1,46 +0,0 @@
1
- import { dual, Pipeable } from '../pipe.mjs';
2
- import { make as make$1, solve as solve$2 } from '../polynomial/linear.mjs';
3
- import { round } from '../utils.mjs';
4
- import { make } from '../vector/vector2.mjs';
5
- import '../shared/curvy.r6f1j287.mjs';
6
- import '../interval.mjs';
7
- import '../shared/curvy.DJ4xO0al.mjs';
8
-
9
- var _a, _b;
10
- const LinearCurve2dTypeId = Symbol("curvy/curve/linear2d");
11
- class LinearCurve2dImpl extends (_b = Pipeable, _a = LinearCurve2dTypeId, _b) {
12
- constructor(c0, c1) {
13
- super();
14
- this[_a] = LinearCurve2dTypeId;
15
- this.x = c0;
16
- this.y = c1;
17
- }
18
- get [0]() {
19
- return this.x;
20
- }
21
- get [1]() {
22
- return this.y;
23
- }
24
- }
25
- const fromPolynomials$1 = (c0, c1) => new LinearCurve2dImpl(c0, c1);
26
- const fromPoints$1 = (p0, p1) => new LinearCurve2dImpl(make$1(p0.x, p1.x), make$1(p0.y, p1.y));
27
- const isLinearCurve2d$1 = (c) => typeof c === "object" && c !== null && LinearCurve2dTypeId in c;
28
- const derivative$1 = (c) => make(c.x.c1, c.y.c1);
29
- const solve$1 = dual(
30
- 2,
31
- (c, t) => make(solve$2(c.x, t), solve$2(c.y, t))
32
- );
33
- const length$1 = dual(
34
- 2,
35
- (c, i) => round(Math.sqrt(c.x.c1 ** 2 + c.y.c1 ** 2) * Math.abs(i.end - i.start))
36
- );
37
-
38
- const fromPolynomials = fromPolynomials$1;
39
- const fromPoints = fromPoints$1;
40
- const isLinearCurve2d = isLinearCurve2d$1;
41
- const derivative = derivative$1;
42
- const solve = solve$1;
43
- const length = length$1;
44
-
45
- export { derivative, fromPoints, fromPolynomials, isLinearCurve2d, length, solve };
46
- //# sourceMappingURL=linear2d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linear2d.mjs","sources":["../../src/curve/linear2d.internal.ts","../../src/curve/linear2d.ts"],"sourcesContent":["import type { Interval } from '../interval'\nimport { Pipeable } from '../pipe'\nimport { dual } from '../pipe'\nimport * as LinearPolynomial from '../polynomial/linear'\nimport { round } from '../utils'\nimport * as Vector2 from '../vector/vector2'\nimport type { LinearCurve2d } from './linear2d'\n\nexport const LinearCurve2dTypeId: unique symbol = Symbol('curvy/curve/linear2d')\nexport type LinearCurve2dTypeId = typeof LinearCurve2dTypeId\n\nexport class LinearCurve2dImpl extends Pipeable implements LinearCurve2d {\n readonly [LinearCurve2dTypeId]: LinearCurve2dTypeId = LinearCurve2dTypeId\n\n readonly x: LinearPolynomial.LinearPolynomial\n readonly y: LinearPolynomial.LinearPolynomial\n\n constructor(c0: LinearPolynomial.LinearPolynomial, c1: LinearPolynomial.LinearPolynomial) {\n super()\n this.x = c0\n this.y = c1\n }\n\n get [0]() {\n return this.x\n }\n\n get [1]() {\n return this.y\n }\n}\n\nexport const fromPolynomials: (\n c0: LinearPolynomial.LinearPolynomial,\n c1: LinearPolynomial.LinearPolynomial,\n) => LinearCurve2d = (c0, c1) => new LinearCurve2dImpl(c0, c1)\n\nexport const fromPoints: (p0: Vector2.Vector2, p1: Vector2.Vector2) => LinearCurve2d = (p0, p1) =>\n new LinearCurve2dImpl(LinearPolynomial.make(p0.x, p1.x), LinearPolynomial.make(p0.y, p1.y))\n\nexport const isLinearCurve2d = (c: unknown): c is LinearCurve2d =>\n typeof c === 'object' && c !== null && LinearCurve2dTypeId in c\n\nexport const derivative = (c: LinearCurve2d) => Vector2.make(c.x.c1, c.y.c1)\n\nexport const solve = dual<\n (t: number) => (c: LinearCurve2d) => Vector2.Vector2,\n (c: LinearCurve2d, t: number) => Vector2.Vector2\n>(2, (c: LinearCurve2d, t: number) =>\n Vector2.make(LinearPolynomial.solve(c.x, t), LinearPolynomial.solve(c.y, t)),\n)\n\nexport const length = dual(2, (c: LinearCurve2d, i: Interval) =>\n round(Math.sqrt(c.x.c1 ** 2 + c.y.c1 ** 2) * Math.abs(i.end - i.start)),\n)\n","import type { TwoDimensional } from '../dimensions'\nimport type { Interval } from '../interval'\nimport type { Pipeable } from '../pipe'\nimport type { LinearPolynomial } from '../polynomial/linear'\nimport type { Vector2 } from '../vector/vector2'\nimport type { LinearCurve2dTypeId } from './linear2d.internal'\nimport * as internal from './linear2d.internal'\n\n/**\n * A linear curve in 2D space.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface LinearCurve2d extends Pipeable, TwoDimensional<LinearPolynomial> {\n readonly [LinearCurve2dTypeId]: LinearCurve2dTypeId\n}\n\n/**\n * Creates a new `LinearCurve2d` instance from polynomial parameters.\n *\n * @param x - The x polynomial.\n * @param y - The y polynomial.\n * @returns A new `LinearCurve2d` instance.\n * @since 1.0.0\n */\nexport const fromPolynomials: (x: LinearPolynomial, y: LinearPolynomial) => LinearCurve2d =\n internal.fromPolynomials\n\n/**\n * Creates a new `LinearCurve2d` instance from pairs of coefficients.\n *\n * @param p0 - The x^0 coefficients for the x and y polynomials.\n * @param p1 - The x^1 coefficients for the x and y polynomials.\n */\nexport const fromPoints: (p0: Vector2, p1: Vector2) => LinearCurve2d = internal.fromPoints\n\n/**\n * Checks if a value is a `LinearCurve2d`.\n *\n * @param c - The value to check.\n * @returns `true` if the value is a `LinearCurve2d`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isLinearCurve2d: (c: unknown) => c is LinearCurve2d = internal.isLinearCurve2d\n\n/**\n * Gets the derivative of a linear curve as a vector\n *\n * @param c - The linear curve to get the derivative of.\n * @returns The derivative of the linear curve as a vector.\n * @since 1.0.0\n */\nexport const derivative: (c: LinearCurve2d) => Vector2 = internal.derivative\n\nexport const solve: {\n /**\n * Solves the linear curve for a given parameter t.\n *\n * @param t - The parameter value.\n * @returns A function that takes a linear curve and returns the point on the curve at parameter t.\n * @since 1.0.0\n */\n (t: number): (c: LinearCurve2d) => Vector2\n /**\n * Solves the linear curve for a given parameter t.\n *\n * @param c - The linear curve to solve.\n * @param t - The parameter value.\n * @returns The point on the curve at parameter t.\n * @since 1.0.0\n */\n (c: LinearCurve2d, t: number): Vector2\n} = internal.solve\n\nexport const length: {\n /**\n * Calculates (approximates) the length of a linear curve.\n *\n * @param c - The linear curve to calculate the length of.\n * @param i - The interval to calculate the length over.\n * @returns The length of the linear curve over the given interval.\n * @since 1.0.0\n */\n (c: LinearCurve2d, i: Interval): number\n /**\n * Calculates (approximates) the length of a linear curve.\n *\n * @param i - The interval to calculate the length over.\n * @returns A function that takes a linear curve and returns the length of the linear curve over the given interval.\n * @since 1.0.0\n */\n (i: Interval): (c: LinearCurve2d) => number\n} = internal.length\n"],"names":["fromPolynomials","fromPoints","LinearPolynomial.make","isLinearCurve2d","derivative","Vector2.make","solve","LinearPolynomial.solve","length","internal.fromPolynomials","internal.fromPoints","internal.isLinearCurve2d","internal.derivative","internal.solve","internal.length"],"mappings":";;;;;;;;AAAA,IAAA,EAAA,EAAA,EAAA;AAQa,MAAA,mBAAA,GAAqC,OAAO,sBAAsB,CAAA;AAGlE,MAAA,iBAAA,UAA0B,EAC3B,GAAA,QAAA,EAAA,EAAA,GAAA,mBAAA,EAD2B,EAAkC,EAAA;AAAA,EAMvE,WAAA,CAAY,IAAuC,EAAuC,EAAA;AACxF,IAAM,KAAA,EAAA;AANR,IAAA,IAAA,CAAU,EAA4C,CAAA,GAAA,mBAAA;AAOpD,IAAA,IAAA,CAAK,CAAI,GAAA,EAAA;AACT,IAAA,IAAA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AAQK,MAAM,aAA0DC;AAShE,MAAM,kBAAsDC;AAS5D,MAAM,aAA4CC;AAElD,MAAM,QAkBTC;AAEG,MAAM,SAkBTC;;;;"}
@@ -1,117 +0,0 @@
1
- import { T as TwoDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
- import { Interval } from '../interval.mjs';
3
- import { Pipeable } from '../pipe.mjs';
4
- import { Q as QuadraticPolynomial } from '../shared/curvy.FDaj5rlj.mjs';
5
- import { Vector2 } from '../vector/vector2.mjs';
6
- import { LinearCurve2d } from './linear2d.mjs';
7
- import '../vector/vector3.mjs';
8
- import '../vector/vector4.mjs';
9
-
10
- declare const QuadraticCurve2dTypeId: unique symbol;
11
- type QuadraticCurve2dTypeId = typeof QuadraticCurve2dTypeId;
12
-
13
- /**
14
- * A quadratic curve in 2D space.
15
- *
16
- * All fields are readonly and immutable, and all operations create new instances.
17
- *
18
- * @since 1.0.0
19
- */
20
- interface QuadraticCurve2d extends Pipeable, TwoDimensional<QuadraticPolynomial> {
21
- readonly [QuadraticCurve2dTypeId]: QuadraticCurve2dTypeId;
22
- }
23
- /**
24
- * Creates a new `QuadraticCurve2d` instance from polynomial parameters.
25
- *
26
- * @param c0 - The x polynomial.
27
- * @param c1 - The y polynomial.
28
- * @returns A new `QuadraticCurve2d` instance.
29
- * @since 1.0.0
30
- */
31
- declare const fromPolynomials: (c0: QuadraticPolynomial, c1: QuadraticPolynomial) => QuadraticCurve2d;
32
- /**
33
- * Creates a new `QuadraticCurve2d` instance from pairs of coefficients.
34
- *
35
- * @param p0 - The x^0 coefficients for the x and y polynomials.
36
- * @param p1 - The x^1 coefficients for the x and y polynomials.
37
- * @param p2 - The x^2 coefficients for the x and y polynomials.
38
- * @returns A new `QuadraticCurve2d` instance.
39
- * @since 1.0.0
40
- */
41
- declare const fromPoints: (p0: Vector2, p1: Vector2, p2: Vector2) => QuadraticCurve2d;
42
- /**
43
- * Checks if a value is a `QuadraticCurve2d`.
44
- *
45
- * @param c - The value to check.
46
- * @returns `true` if the value is a `QuadraticCurve2d`, `false` otherwise.
47
- * @since 1.0.0
48
- */
49
- declare const isQuadraticCurve2d: (c: unknown) => c is QuadraticCurve2d;
50
- declare const solve: {
51
- /**
52
- * Solves the quadratic curve for a given parameter t.
53
- *
54
- * @param t - The parameter value.
55
- * @returns A function that takes a quadratic curve and returns the point on the curve at parameter t.
56
- * @since 1.0.0
57
- */
58
- (t: number): (c: QuadraticCurve2d) => Vector2;
59
- /**
60
- * Solves the quadratic curve for a given parameter t.
61
- *
62
- * @param c - The quadratic curve to solve.
63
- * @param t - The parameter value.
64
- * @returns The point on the curve at parameter t.
65
- * @since 1.0.0
66
- */
67
- (c: QuadraticCurve2d, t: number): Vector2;
68
- };
69
- declare const length: {
70
- /**
71
- * Computes the length of the quadratic curve over a given interval.
72
- *
73
- * @param c - The quadratic curve to compute the length of.
74
- * @param i - The interval over which to compute the length.
75
- * @returns The length of the quadratic curve over the interval.
76
- * @since 1.0.0
77
- */
78
- (c: QuadraticCurve2d, i: Interval): number;
79
- /**
80
- * Computes the length of the quadratic curve over a given interval.
81
- *
82
- * @param i - The interval over which to compute the length.
83
- * @returns A function that takes a quadratic curve and returns the length of the curve over the interval.
84
- * @since 1.0.0
85
- */
86
- (i: Interval): (c: QuadraticCurve2d) => number;
87
- };
88
- /**
89
- * Computes the derivative of a quadratic curve.
90
- *
91
- * @param c - The quadratic curve to compute the derivative of.
92
- * @returns The derivative of the quadratic curve as a linear curve.
93
- * @since 1.0.0
94
- */
95
- declare const derivative: (c: QuadraticCurve2d) => LinearCurve2d;
96
- declare const curvature: {
97
- /**
98
- * Computes the curvature of the quadratic curve at a given parameter t.
99
- *
100
- * @param c - The quadratic curve to compute the curvature for.
101
- * @param t - The parameter value.
102
- * @returns The curvature of the quadratic curve at parameter t.
103
- * @since 1.0.0
104
- */
105
- (c: QuadraticCurve2d, t: number): number;
106
- /**
107
- * Computes the curvature of the quadratic curve at a given parameter t.
108
- *
109
- * @param t - The parameter value.
110
- * @returns A function that takes a quadratic curve and returns the curvature of the curve at parameter t.
111
- * @since 1.0.0
112
- */
113
- (t: number): (c: QuadraticCurve2d) => number;
114
- };
115
-
116
- export { curvature, derivative, fromPoints, fromPolynomials, isQuadraticCurve2d, length, solve };
117
- export type { QuadraticCurve2d };
@@ -1,82 +0,0 @@
1
- import { size, scaleShift, biunit } from '../interval.mjs';
2
- 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';
3
- import { dual, Pipeable } from '../pipe.mjs';
4
- import { make as make$2 } from '../polynomial/linear.mjs';
5
- import { make, solve as solve$2, derivative as derivative$2 } from '../polynomial/quadratic.mjs';
6
- import { round } from '../utils.mjs';
7
- import { make as make$1, magnitude, cross } from '../vector/vector2.mjs';
8
- import { fromPolynomials as fromPolynomials$2, length as length$2, solve as solve$3, derivative as derivative$3 } from './linear2d.mjs';
9
- import '../shared/curvy.r6f1j287.mjs';
10
- import '../shared/curvy.BxdGW9he.mjs';
11
- import '../shared/curvy.DJ4xO0al.mjs';
12
-
13
- var _a, _b;
14
- const QuadraticCurve2dTypeId = Symbol("curvy/curve/quadratic2d");
15
- class QuadraticCurve2dImpl extends (_b = Pipeable, _a = QuadraticCurve2dTypeId, _b) {
16
- constructor(c0, c1) {
17
- super();
18
- this[_a] = QuadraticCurve2dTypeId;
19
- this.x = c0;
20
- this.y = c1;
21
- }
22
- get [0]() {
23
- return this.x;
24
- }
25
- get [1]() {
26
- return this.y;
27
- }
28
- }
29
- const fromPolynomials$1 = (c0, c1) => new QuadraticCurve2dImpl(c0, c1);
30
- const fromPoints$1 = (p0, p1, p2) => new QuadraticCurve2dImpl(
31
- make(p0.x, p1.x, p2.x),
32
- make(p0.y, p1.y, p2.y)
33
- );
34
- const isQuadraticCurve2d$1 = (c) => typeof c === "object" && c !== null && QuadraticCurve2dTypeId in c;
35
- const solve$1 = dual(
36
- 2,
37
- (c, t) => make$1(solve$2(c.x, t), solve$2(c.y, t))
38
- );
39
- const derivative$1 = (c) => fromPolynomials$2(
40
- derivative$2(c.x),
41
- derivative$2(c.y)
42
- );
43
- const length$1 = dual(2, (c, i) => {
44
- if (size(i) === 0) {
45
- return 0;
46
- }
47
- if (c.x.c2 === 0 && c.y.c2 === 0) {
48
- return length$2(
49
- fromPolynomials$2(
50
- make$2(c.x.c0, c.x.c1),
51
- make$2(c.y.c0, c.y.c1)
52
- ),
53
- i
54
- );
55
- }
56
- const d = derivative$1(c);
57
- const { scale, shift } = scaleShift(biunit, i);
58
- return round(
59
- (GL32_W0 * magnitude(solve$3(d, shift + scale * -0.9972638618494816)) + GL32_W0 * magnitude(solve$3(d, shift + scale * GL32_X0)) + GL32_W1 * magnitude(solve$3(d, shift + scale * -0.9856115115452684)) + GL32_W1 * magnitude(solve$3(d, shift + scale * GL32_X1)) + GL32_W2 * magnitude(solve$3(d, shift + scale * -0.9647622555875064)) + GL32_W2 * magnitude(solve$3(d, shift + scale * GL32_X2)) + GL32_W3 * magnitude(solve$3(d, shift + scale * -0.9349060759377397)) + GL32_W3 * magnitude(solve$3(d, shift + scale * GL32_X3)) + GL32_W4 * magnitude(solve$3(d, shift + scale * -0.8963211557660521)) + GL32_W4 * magnitude(solve$3(d, shift + scale * GL32_X4)) + GL32_W5 * magnitude(solve$3(d, shift + scale * -0.84936761373257)) + GL32_W5 * magnitude(solve$3(d, shift + scale * GL32_X5)) + GL32_W6 * magnitude(solve$3(d, shift + scale * -0.7944837959679424)) + GL32_W6 * magnitude(solve$3(d, shift + scale * GL32_X6)) + GL32_W7 * magnitude(solve$3(d, shift + scale * -0.7321821187402897)) + GL32_W7 * magnitude(solve$3(d, shift + scale * GL32_X7)) + GL32_W8 * magnitude(solve$3(d, shift + scale * -0.6630442669302152)) + GL32_W8 * magnitude(solve$3(d, shift + scale * GL32_X8)) + GL32_W9 * magnitude(solve$3(d, shift + scale * -0.5877157572407623)) + GL32_W9 * magnitude(solve$3(d, shift + scale * GL32_X9)) + GL32_W10 * magnitude(solve$3(d, shift + scale * -0.5068999089322294)) + GL32_W10 * magnitude(solve$3(d, shift + scale * GL32_X10)) + GL32_W11 * magnitude(solve$3(d, shift + scale * -0.42135127613063533)) + GL32_W11 * magnitude(solve$3(d, shift + scale * GL32_X11)) + GL32_W12 * magnitude(solve$3(d, shift + scale * -0.33186860228212767)) + GL32_W12 * magnitude(solve$3(d, shift + scale * GL32_X12)) + GL32_W13 * magnitude(solve$3(d, shift + scale * -0.23928736225213706)) + GL32_W13 * magnitude(solve$3(d, shift + scale * GL32_X13)) + GL32_W14 * magnitude(solve$3(d, shift + scale * -0.1444719615827965)) + GL32_W14 * magnitude(solve$3(d, shift + scale * GL32_X14)) + GL32_W15 * magnitude(solve$3(d, shift + scale * -0.04830766568773831)) + GL32_W15 * magnitude(solve$3(d, shift + scale * GL32_X15))) * scale
60
- );
61
- });
62
- const curvature$1 = dual(2, (c, t) => {
63
- const d = derivative$1(c);
64
- const v = solve$3(d, t);
65
- const a = derivative$3(d);
66
- const vMag = magnitude(v);
67
- if (vMag === 0) {
68
- return 0;
69
- }
70
- return round(Math.abs(cross(v, a)) / vMag ** 3);
71
- });
72
-
73
- const fromPolynomials = fromPolynomials$1;
74
- const fromPoints = fromPoints$1;
75
- const isQuadraticCurve2d = isQuadraticCurve2d$1;
76
- const solve = solve$1;
77
- const length = length$1;
78
- const derivative = derivative$1;
79
- const curvature = curvature$1;
80
-
81
- export { curvature, derivative, fromPoints, fromPolynomials, isQuadraticCurve2d, length, solve };
82
- //# sourceMappingURL=quadratic2d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quadratic2d.mjs","sources":["../../src/curve/quadratic2d.internal.ts","../../src/curve/quadratic2d.ts"],"sourcesContent":["import * as Interval from '../interval'\nimport {\n GL32_W0,\n GL32_W1,\n GL32_W2,\n GL32_W3,\n GL32_W4,\n GL32_W5,\n GL32_W6,\n GL32_W7,\n GL32_W8,\n GL32_W9,\n GL32_W10,\n GL32_W11,\n GL32_W12,\n GL32_W13,\n GL32_W14,\n GL32_W15,\n GL32_X0,\n GL32_X1,\n GL32_X2,\n GL32_X3,\n GL32_X4,\n GL32_X5,\n GL32_X6,\n GL32_X7,\n GL32_X8,\n GL32_X9,\n GL32_X10,\n GL32_X11,\n GL32_X12,\n GL32_X13,\n GL32_X14,\n GL32_X15,\n} from '../length'\nimport { Pipeable } from '../pipe'\nimport { dual } from '../pipe'\nimport * as LinearPolynomial from '../polynomial/linear'\nimport * as QuadraticPolynomial from '../polynomial/quadratic'\nimport { round } from '../utils'\nimport * as Vector2 from '../vector/vector2'\nimport * as LinearCurve2d from './linear2d'\nimport type { QuadraticCurve2d } from './quadratic2d'\n\nexport const QuadraticCurve2dTypeId: unique symbol = Symbol('curvy/curve/quadratic2d')\nexport type QuadraticCurve2dTypeId = typeof QuadraticCurve2dTypeId\n\nexport class QuadraticCurve2dImpl extends Pipeable implements QuadraticCurve2d {\n readonly [QuadraticCurve2dTypeId]: QuadraticCurve2dTypeId = QuadraticCurve2dTypeId\n\n readonly x: QuadraticPolynomial.QuadraticPolynomial\n readonly y: QuadraticPolynomial.QuadraticPolynomial\n\n constructor(\n c0: QuadraticPolynomial.QuadraticPolynomial,\n c1: QuadraticPolynomial.QuadraticPolynomial,\n ) {\n super()\n this.x = c0\n this.y = c1\n }\n\n get [0]() {\n return this.x\n }\n\n get [1]() {\n return this.y\n }\n}\n\nexport const fromPolynomials: (\n c0: QuadraticPolynomial.QuadraticPolynomial,\n c1: QuadraticPolynomial.QuadraticPolynomial,\n) => QuadraticCurve2d = (c0, c1) => new QuadraticCurve2dImpl(c0, c1)\n\nexport const fromPoints: (\n p0: Vector2.Vector2,\n p1: Vector2.Vector2,\n p2: Vector2.Vector2,\n) => QuadraticCurve2d = (p0, p1, p2) =>\n new QuadraticCurve2dImpl(\n QuadraticPolynomial.make(p0.x, p1.x, p2.x),\n QuadraticPolynomial.make(p0.y, p1.y, p2.y),\n )\n\nexport const isQuadraticCurve2d = (c: unknown): c is QuadraticCurve2d =>\n typeof c === 'object' && c !== null && QuadraticCurve2dTypeId in c\n\nexport const solve = dual<\n (t: number) => (c: QuadraticCurve2d) => Vector2.Vector2,\n (c: QuadraticCurve2d, t: number) => Vector2.Vector2\n>(2, (c: QuadraticCurve2d, t: number) =>\n Vector2.make(QuadraticPolynomial.solve(c.x, t), QuadraticPolynomial.solve(c.y, t)),\n)\n\nexport const derivative = (c: QuadraticCurve2d) =>\n LinearCurve2d.fromPolynomials(\n QuadraticPolynomial.derivative(c.x),\n QuadraticPolynomial.derivative(c.y),\n )\n\nexport const length = dual(2, (c: QuadraticCurve2d, i: Interval.Interval) => {\n if (Interval.size(i) === 0) {\n return 0\n }\n\n if (c.x.c2 === 0 && c.y.c2 === 0) {\n return LinearCurve2d.length(\n LinearCurve2d.fromPolynomials(\n LinearPolynomial.make(c.x.c0, c.x.c1),\n LinearPolynomial.make(c.y.c0, c.y.c1),\n ),\n i,\n )\n }\n\n const d = derivative(c)\n\n const { scale, shift } = Interval.scaleShift(Interval.biunit, i)\n\n return round(\n (GL32_W0 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X0)) +\n GL32_W0 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X0)) +\n GL32_W1 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X1)) +\n GL32_W1 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X1)) +\n GL32_W2 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X2)) +\n GL32_W2 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X2)) +\n GL32_W3 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X3)) +\n GL32_W3 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X3)) +\n GL32_W4 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X4)) +\n GL32_W4 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X4)) +\n GL32_W5 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X5)) +\n GL32_W5 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X5)) +\n GL32_W6 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X6)) +\n GL32_W6 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X6)) +\n GL32_W7 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X7)) +\n GL32_W7 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X7)) +\n GL32_W8 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X8)) +\n GL32_W8 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X8)) +\n GL32_W9 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X9)) +\n GL32_W9 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X9)) +\n GL32_W10 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X10)) +\n GL32_W10 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X10)) +\n GL32_W11 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X11)) +\n GL32_W11 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X11)) +\n GL32_W12 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X12)) +\n GL32_W12 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X12)) +\n GL32_W13 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X13)) +\n GL32_W13 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X13)) +\n GL32_W14 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X14)) +\n GL32_W14 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X14)) +\n GL32_W15 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * -GL32_X15)) +\n GL32_W15 * Vector2.magnitude(LinearCurve2d.solve(d, shift + scale * GL32_X15))) *\n scale,\n )\n})\n\nexport const curvature = dual(2, (c: QuadraticCurve2d, t: number) => {\n const d = derivative(c)\n const v = LinearCurve2d.solve(d, t)\n const a = LinearCurve2d.derivative(d)\n\n const vMag = Vector2.magnitude(v)\n\n if (vMag === 0) {\n return 0\n }\n\n return round(Math.abs(Vector2.cross(v, a)) / vMag ** 3)\n})\n","import type { TwoDimensional } from '../dimensions'\nimport type { Interval } from '../interval'\nimport type { Pipeable } from '../pipe'\nimport type { QuadraticPolynomial } from '../polynomial/quadratic'\nimport type { Vector2 } from '../vector/vector2'\nimport type { LinearCurve2d } from './linear2d'\nimport type { QuadraticCurve2dTypeId } from './quadratic2d.internal'\nimport * as internal from './quadratic2d.internal'\n\n/**\n * A quadratic curve in 2D space.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface QuadraticCurve2d extends Pipeable, TwoDimensional<QuadraticPolynomial> {\n readonly [QuadraticCurve2dTypeId]: QuadraticCurve2dTypeId\n}\n\n/**\n * Creates a new `QuadraticCurve2d` instance from polynomial parameters.\n *\n * @param c0 - The x polynomial.\n * @param c1 - The y polynomial.\n * @returns A new `QuadraticCurve2d` instance.\n * @since 1.0.0\n */\nexport const fromPolynomials: (\n c0: QuadraticPolynomial,\n c1: QuadraticPolynomial,\n) => QuadraticCurve2d = internal.fromPolynomials\n\n/**\n * Creates a new `QuadraticCurve2d` instance from pairs of coefficients.\n *\n * @param p0 - The x^0 coefficients for the x and y polynomials.\n * @param p1 - The x^1 coefficients for the x and y polynomials.\n * @param p2 - The x^2 coefficients for the x and y polynomials.\n * @returns A new `QuadraticCurve2d` instance.\n * @since 1.0.0\n */\nexport const fromPoints: (p0: Vector2, p1: Vector2, p2: Vector2) => QuadraticCurve2d =\n internal.fromPoints\n\n/**\n * Checks if a value is a `QuadraticCurve2d`.\n *\n * @param c - The value to check.\n * @returns `true` if the value is a `QuadraticCurve2d`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isQuadraticCurve2d: (c: unknown) => c is QuadraticCurve2d = internal.isQuadraticCurve2d\n\nexport const solve: {\n /**\n * Solves the quadratic curve for a given parameter t.\n *\n * @param t - The parameter value.\n * @returns A function that takes a quadratic curve and returns the point on the curve at parameter t.\n * @since 1.0.0\n */\n (t: number): (c: QuadraticCurve2d) => Vector2\n /**\n * Solves the quadratic curve for a given parameter t.\n *\n * @param c - The quadratic curve to solve.\n * @param t - The parameter value.\n * @returns The point on the curve at parameter t.\n * @since 1.0.0\n */\n (c: QuadraticCurve2d, t: number): Vector2\n} = internal.solve\n\nexport const length: {\n /**\n * Computes the length of the quadratic curve over a given interval.\n *\n * @param c - The quadratic curve to compute the length of.\n * @param i - The interval over which to compute the length.\n * @returns The length of the quadratic curve over the interval.\n * @since 1.0.0\n */\n (c: QuadraticCurve2d, i: Interval): number\n /**\n * Computes the length of the quadratic curve over a given interval.\n *\n * @param i - The interval over which to compute the length.\n * @returns A function that takes a quadratic curve and returns the length of the curve over the interval.\n * @since 1.0.0\n */\n (i: Interval): (c: QuadraticCurve2d) => number\n} = internal.length\n\n/**\n * Computes the derivative of a quadratic curve.\n *\n * @param c - The quadratic curve to compute the derivative of.\n * @returns The derivative of the quadratic curve as a linear curve.\n * @since 1.0.0\n */\nexport const derivative: (c: QuadraticCurve2d) => LinearCurve2d = internal.derivative\n\nexport const curvature: {\n /**\n * Computes the curvature of the quadratic curve at a given parameter t.\n *\n * @param c - The quadratic curve to compute the curvature for.\n * @param t - The parameter value.\n * @returns The curvature of the quadratic curve at parameter t.\n * @since 1.0.0\n */\n (c: QuadraticCurve2d, t: number): number\n /**\n * Computes the curvature of the quadratic curve at a given parameter t.\n *\n * @param t - The parameter value.\n * @returns A function that takes a quadratic curve and returns the curvature of the curve at parameter t.\n * @since 1.0.0\n */\n (t: number): (c: QuadraticCurve2d) => number\n} = internal.curvature\n"],"names":["fromPolynomials","fromPoints","QuadraticPolynomial.make","isQuadraticCurve2d","solve","Vector2.make","QuadraticPolynomial.solve","derivative","LinearCurve2d.fromPolynomials","QuadraticPolynomial.derivative","length","Interval.size","LinearCurve2d.length","LinearPolynomial.make","Interval.scaleShift","Interval.biunit","Vector2.magnitude","LinearCurve2d.solve","curvature","LinearCurve2d.derivative","Vector2.cross","internal.fromPolynomials","internal.fromPoints","internal.isQuadraticCurve2d","internal.solve","internal.length","internal.derivative","internal.curvature"],"mappings":";;;;;;;;;;;;AAAA,IAAA,EAAA,EAAA,EAAA;AA4Ca,MAAA,sBAAA,GAAwC,OAAO,yBAAyB,CAAA;AAGxE,MAAA,oBAAA,UAA6B,EAC9B,GAAA,QAAA,EAAA,EAAA,GAAA,sBAAA,EAD8B,EAAqC,EAAA;AAAA,EAM7E,WAAA,CACE,IACA,EACA,EAAA;AACA,IAAM,KAAA,EAAA;AATR,IAAA,IAAA,CAAU,EAAkD,CAAA,GAAA,sBAAA;AAU1D,IAAA,IAAA,CAAK,CAAI,GAAA,EAAA;AACT,IAAA,IAAA,CAAK,CAAI,GAAA,EAAA;AAAA;AACX,EAEA,KAAK,CAAC,CAAI,GAAA;AACR,IAAA,OAAO,IAAK,CAAA,CAAA;AAAA;AACd,EAEA,KAAK,CAAC,CAAI,GAAA;AACR,IAAA,OAAO,IAAK,CAAA,CAAA;AAAA;AAEhB;AAEO,MAAMA,oBAGW,CAAC,EAAA,EAAI,OAAO,IAAI,oBAAA,CAAqB,IAAI,EAAE,CAAA;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