curvy 2.0.0-alpha.2 → 2.0.0-alpha.4
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.
- package/dist/characteristic/index.d.mts +9 -9
- package/dist/characteristic/index.mjs +1 -1
- package/dist/curve/index.d.mts +10 -2
- package/dist/curve/index.mjs +1 -1
- package/dist/interval/index.d.mts +9 -3
- package/dist/interval/index.mjs +2 -2
- package/dist/matrix/index.d.mts +9 -2
- package/dist/path/index.d.mts +15 -223
- package/dist/path/index.mjs +6 -6
- package/dist/path/index.mjs.map +1 -1
- package/dist/polynomial/index.d.mts +9 -2
- package/dist/polynomial/index.mjs +2 -2
- package/dist/shared/{characteristic-B9nCh_cx.mjs → characteristic-DLlhja-I.mjs} +9 -9
- package/dist/shared/{characteristic-B9nCh_cx.mjs.map → characteristic-DLlhja-I.mjs.map} +1 -1
- package/dist/shared/{cubic-CpHAx8cC.mjs → cubic-CMonq6bg.mjs} +26 -5
- package/dist/shared/cubic-CMonq6bg.mjs.map +1 -0
- package/dist/shared/cubic-DkBqcZf-.d.mts +121 -0
- package/dist/shared/interval-Bhzeqp8M.d.mts +62 -0
- package/dist/shared/{interval-05CR6eBf.mjs → interval-X1EYuf-T.mjs} +2 -2
- package/dist/shared/{interval-05CR6eBf.mjs.map → interval-X1EYuf-T.mjs.map} +1 -1
- package/dist/shared/interval2d-BMk5UYXD.d.mts +29 -0
- package/dist/shared/{interval2d-8IBZnUOq.mjs → interval2d-ca0J1NMr.mjs} +8 -8
- package/dist/shared/{interval2d-8IBZnUOq.mjs.map → interval2d-ca0J1NMr.mjs.map} +1 -1
- package/dist/shared/matrix4x4-CaytTaB_.d.mts +168 -0
- package/dist/shared/{quadratic-CamozcFc.mjs → quadratic-DyeMtvET.mjs} +20 -2
- package/dist/shared/quadratic-DyeMtvET.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-D-UevGKu.d.mts +60 -0
- package/dist/shared/{rationalCubic2d-Bys2Uory.mjs → rationalCubic2d-D658ltUM.mjs} +17 -17
- package/dist/shared/{rationalCubic2d-Bys2Uory.mjs.map → rationalCubic2d-D658ltUM.mjs.map} +1 -1
- package/dist/shared/rationalCubic2d-MgMSJaAU.d.mts +104 -0
- package/dist/shared/{rationalCubic2d-BEgUGSFf.mjs → rationalCubic2d-Vw4qGPZj.mjs} +9 -9
- package/dist/shared/{rationalCubic2d-BEgUGSFf.mjs.map → rationalCubic2d-Vw4qGPZj.mjs.map} +1 -1
- package/dist/shared/{solution-CrtLfqEq.mjs → solution-3TDATEMn.mjs} +28 -2
- package/dist/shared/solution-3TDATEMn.mjs.map +1 -0
- package/dist/shared/solution-DInDT2Hq.d.mts +60 -0
- package/dist/shared/{vector2-CL1HDdPr.mjs → vector2-CCuJx1rX.mjs} +6 -6
- package/dist/shared/{vector2-CL1HDdPr.mjs.map → vector2-CCuJx1rX.mjs.map} +1 -1
- package/dist/shared/vector2-euuV_bNQ.d.mts +58 -0
- package/dist/shared/vector3-3Xx7GVk7.d.mts +37 -0
- package/dist/shared/{vector3-D-tv_aKL.mjs → vector3-C-qgKAjR.mjs} +2 -2
- package/dist/shared/{vector3-D-tv_aKL.mjs.map → vector3-C-qgKAjR.mjs.map} +1 -1
- package/dist/shared/{vector4-5KbjoHVj.mjs → vector4-BhOKDhD5.mjs} +2 -2
- package/dist/shared/{vector4-5KbjoHVj.mjs.map → vector4-BhOKDhD5.mjs.map} +1 -1
- package/dist/solution/index.d.mts +7 -2
- package/dist/solution/index.mjs +1 -1
- package/dist/splines/index.d.mts +37 -606
- package/dist/splines/index.mjs +193 -35
- package/dist/splines/index.mjs.map +1 -1
- package/dist/vector/index.d.mts +10 -3
- package/dist/vector/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/shared/cubic-BajUY0JT.d.mts +0 -1100
- package/dist/shared/cubic-CpHAx8cC.mjs.map +0 -1
- package/dist/shared/interval-Dy-RMEE3.d.mts +0 -533
- package/dist/shared/interval2d-C2id9u31.d.mts +0 -172
- package/dist/shared/matrix4x4-Dm_tSiH1.d.mts +0 -1183
- package/dist/shared/quadratic-CamozcFc.mjs.map +0 -1
- package/dist/shared/rationalCubic2d-B6g97ryJ.d.mts +0 -308
- package/dist/shared/rationalCubic2d-DlQfBURs.d.mts +0 -818
- package/dist/shared/solution-CrtLfqEq.mjs.map +0 -1
- package/dist/shared/solution-sNQ-ZVhN.d.mts +0 -251
- package/dist/shared/vector2-DPUY3_eA.d.mts +0 -470
- package/dist/shared/vector3-DqeOZtOB.d.mts +0 -703
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristic-
|
|
1
|
+
{"version":3,"file":"characteristic-DLlhja-I.mjs","names":["Matrix4x4.make","CubicPolynomial.fromVector","Matrix4x4.vectorProductLeft"],"sources":["../../src/characteristic/characteristic.ts"],"sourcesContent":["import * as Matrix4x4 from '../matrix/matrix4x4'\nimport * as CubicPolynomial from '../polynomial/cubic'\nimport { roundDown } from '../number'\nimport type * as Vector4 from '../vector/vector4'\n\n/**\n * The cubic Bézier characteristic matrix.\n *\n * Maps Bernstein-basis control points `(P₀, P₁, P₂, P₃)` to monomial cubic\n * coefficients `(c₀, c₁, c₂, c₃)` for `c₀ + c₁·t + c₂·t² + c₃·t³`. The matrix\n * IS the Bézier spline family — combined with control points (via {@link apply}),\n * it produces the cubic polynomial that parameterizes the curve.\n *\n * @since 2.0.0\n */\nexport const cubicBezier: Matrix4x4.Matrix4x4 = Matrix4x4.make(\n 1,\n 0,\n 0,\n 0,\n -3,\n 3,\n 0,\n 0,\n 3,\n -6,\n 3,\n 0,\n -1,\n 3,\n -3,\n 1,\n)\n\n/**\n * The cubic Hermite characteristic matrix.\n *\n * Maps Hermite control data `(P₀, V₀, P₁, V₁)` — two endpoints and two\n * tangent vectors — to monomial cubic coefficients.\n *\n * @since 2.0.0\n */\nexport const cubicHermite: Matrix4x4.Matrix4x4 = Matrix4x4.make(\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n -3,\n -2,\n 3,\n -1,\n 2,\n 1,\n -2,\n 1,\n)\n\n/**\n * The uniform cubic B-spline (basis spline) characteristic matrix.\n *\n * Maps a window of four control points to the monomial cubic coefficients\n * of one segment of the corresponding uniform cubic B-spline. Stride-1\n * application produces a C² piecewise spline; the curve does not generally\n * pass through the control points.\n *\n * @since 2.0.0\n */\nexport const cubicBasisSpline: Matrix4x4.Matrix4x4 = Matrix4x4.make(\n 1 / 6,\n 4 / 6,\n roundDown(1 / 6),\n 0,\n -0.5,\n 0,\n 0.5,\n 0,\n 0.5,\n -1,\n 0.5,\n 0,\n -1 / 6,\n 0.5,\n -0.5,\n 1 / 6,\n)\n\nconst cardinalCache = new Map<number, Matrix4x4.Matrix4x4>()\n\n/**\n * The cubic Cardinal spline characteristic matrix, parameterized by tension.\n *\n * Maps four control points to the monomial cubic coefficients of one\n * Cardinal segment. The tension `s` controls how tightly the curve hugs\n * the control points: `s = 0` produces straight-line segments between\n * adjacent points, `s = 0.5` is the Catmull-Rom variant (see\n * {@link cubicCatmullRom}), and higher values produce looser, more curved\n * shapes.\n *\n * Cached per tension value — repeated calls with the same tension return\n * the same matrix instance.\n *\n * @param tension - The tension parameter.\n * @returns The characteristic matrix for that tension.\n * @since 2.0.0\n */\nexport const cubicCardinal = (tension: number): Matrix4x4.Matrix4x4 => {\n let m = cardinalCache.get(tension)\n if (m === undefined) {\n m = Matrix4x4.make(\n 0,\n 1,\n 0,\n 0,\n -tension,\n 0,\n tension,\n 0,\n 2 * tension,\n tension - 3,\n 3 - 2 * tension,\n -tension,\n -tension,\n 2 - tension,\n tension - 2,\n tension,\n )\n cardinalCache.set(tension, m)\n }\n return m\n}\n\n/**\n * The cubic Catmull-Rom characteristic matrix — Cardinal with tension `0.5`.\n * The most common Cardinal-family variant; reused widely enough to deserve\n * a constant.\n *\n * @since 2.0.0\n */\nexport const cubicCatmullRom: Matrix4x4.Matrix4x4 = cubicCardinal(0.5)\n\n/**\n * Applies a characteristic matrix to N channels of control values, producing\n * N cubic polynomials in monomial form.\n *\n * Each channel is a `Vector4` packing one axis's values across the four\n * control points: `(v₀, v₁, v₂, v₃)`. The result tuple has the same arity\n * as the input.\n *\n * The polynomial 2D spline pipeline applies this with two channels (x, y);\n * the rational 2D pipeline uses three (x, y, w) where `w` is the projective\n * denominator. Higher channel counts generalize to 3D, rational 3D, and\n * beyond — the characteristic matrix doesn't care about the geometric\n * domain, only about how to combine four samples per channel.\n *\n * @param matrix - The characteristic matrix of the spline family.\n * @param channels - One `Vector4` per output polynomial, packing the four control values for that channel.\n * @returns A tuple of cubic polynomials, one per input channel.\n * @since 2.0.0\n */\nexport const apply = <const Channels extends ReadonlyArray<Vector4.Vector4>>(\n matrix: Matrix4x4.Matrix4x4,\n ...channels: Channels\n): { readonly [K in keyof Channels]: CubicPolynomial.CubicPolynomial } => {\n const result = channels.map((c) =>\n CubicPolynomial.fromVector(Matrix4x4.vectorProductLeft(matrix, c)),\n )\n return result as { readonly [K in keyof Channels]: CubicPolynomial.CubicPolynomial }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,cAAmCA,KAC9C,GACA,GACA,GACA,GACA,IACA,GACA,GACA,GACA,GACA,IACA,GACA,GACA,IACA,GACA,IACA,EACD;;;;;;;;;AAUD,MAAa,eAAoCA,KAC/C,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,GACA,GACA,IACA,EACD;;;;;;;;;;;AAYD,MAAa,mBAAwCA,KACnD,IAAI,GACJ,IAAI,GACJ,UAAU,IAAI,EAAE,EAChB,GACA,KACA,GACA,IACA,GACA,IACA,IACA,IACA,GACA,KAAK,GACL,IACA,KACA,IAAI,EACL;AAED,MAAM,gCAAgB,IAAI,KAAkC;;;;;;;;;;;;;;;;;;AAmB5D,MAAa,iBAAiB,YAAyC;CACrE,IAAI,IAAI,cAAc,IAAI,QAAQ;CAClC,IAAI,MAAM,KAAA,GAAW;EACnB,IAAIA,KACF,GACA,GACA,GACA,GACA,CAAC,SACD,GACA,SACA,GACA,IAAI,SACJ,UAAU,GACV,IAAI,IAAI,SACR,CAAC,SACD,CAAC,SACD,IAAI,SACJ,UAAU,GACV,QACD;EACD,cAAc,IAAI,SAAS,EAAE;;CAE/B,OAAO;;;;;;;;;AAUT,MAAa,kBAAuC,cAAc,GAAI;;;;;;;;;;;;;;;;;;;;AAqBtE,MAAa,SACX,QACA,GAAG,aACqE;CAIxE,OAHe,SAAS,KAAK,MAC3BC,WAA2BC,kBAA4B,QAAQ,EAAE,CAAC,CAEvD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-25Hzd3z8.mjs";
|
|
2
2
|
import { Pipeable, dual, invariant } from "../utils.mjs";
|
|
3
3
|
import { clampToZero, epsEquals } from "../number.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as filter, c as make$5, d as toOpen, l as scaleShift, n as contains, o as fromMinMax, t as biunit, u as size } from "./interval-
|
|
6
|
-
import { a as match, l as two, n as fromArray, o as none, r as isNone, s as one } from "./solution-
|
|
4
|
+
import { a as make$4 } from "./vector2-CCuJx1rX.mjs";
|
|
5
|
+
import { a as filter, c as make$5, d as toOpen, l as scaleShift, n as contains, o as fromMinMax, t as biunit, u as size } from "./interval-X1EYuf-T.mjs";
|
|
6
|
+
import { a as match, l as two, n as fromArray, o as none, r as isNone, s as one } from "./solution-3TDATEMn.mjs";
|
|
7
7
|
//#region src/polynomial/quadratic.internal.circular.ts
|
|
8
8
|
const QuadraticPolynomialTypeId = Symbol.for("curvy/polynomial/quadratic");
|
|
9
9
|
var QuadraticPolynomialImpl = class extends Pipeable {
|
|
@@ -60,6 +60,7 @@ const asDecreasing$3 = (p) => {
|
|
|
60
60
|
invariant(isDecreasing$3(p), "linear polynomial is not decreasing");
|
|
61
61
|
return p;
|
|
62
62
|
};
|
|
63
|
+
const coefficients$3 = (p) => [p.c0, p.c1];
|
|
63
64
|
const derivative$3 = (p) => p.c1;
|
|
64
65
|
const antiderivative$1 = dual((args) => isLinearPolynomial(args[0]), (p, integrationConstant = 0) => new QuadraticPolynomialImpl(integrationConstant, p.c0, p.c1 / 2));
|
|
65
66
|
const domain$3 = dual(2, (p, r) => {
|
|
@@ -126,6 +127,11 @@ const solveInverse$2 = dual(2, (p, y) => {
|
|
|
126
127
|
return a < b ? two(a, b) : two(b, a);
|
|
127
128
|
});
|
|
128
129
|
const toInverseSolver$2 = (p) => (y) => solveInverse$2(p, y);
|
|
130
|
+
const coefficients$2 = (p) => [
|
|
131
|
+
p.c0,
|
|
132
|
+
p.c1,
|
|
133
|
+
p.c2
|
|
134
|
+
];
|
|
129
135
|
const derivative$2 = (p) => make$3(p.c1, p.c2 * 2);
|
|
130
136
|
const roots$2 = (p) => solveInverse$2(p, 0);
|
|
131
137
|
const extreme = (p) => derivative$2(p).pipe(solveInverse$3(0), match({
|
|
@@ -261,6 +267,12 @@ const solveInverse$1 = dual(2, (self, y) => {
|
|
|
261
267
|
return fromArray(Array.from(roots).toSorted((a, b) => a - b));
|
|
262
268
|
});
|
|
263
269
|
const toInverseSolver$1 = (p) => (y) => solveInverse$1(p, y);
|
|
270
|
+
const coefficients$1 = (p) => [
|
|
271
|
+
p.c0,
|
|
272
|
+
p.c1,
|
|
273
|
+
p.c2,
|
|
274
|
+
p.c3
|
|
275
|
+
];
|
|
264
276
|
const derivative$1 = (p) => make$2(p.c1, p.c2 * 2, p.c3 * 3);
|
|
265
277
|
const subdivide$1 = dual(2, (p, t) => {
|
|
266
278
|
invariant(t > 0 && t < 1, "subdivide parameter t must be in the open interval (0, 1)");
|
|
@@ -319,6 +331,7 @@ var cubic_exports = /* @__PURE__ */ __exportAll({
|
|
|
319
331
|
asDecreasing: () => asDecreasing,
|
|
320
332
|
asIncreasing: () => asIncreasing,
|
|
321
333
|
asMonotonic: () => asMonotonic,
|
|
334
|
+
coefficients: () => coefficients,
|
|
322
335
|
curvature: () => curvature,
|
|
323
336
|
derivative: () => derivative,
|
|
324
337
|
domain: () => domain,
|
|
@@ -399,6 +412,14 @@ const solveInverse = solveInverse$1;
|
|
|
399
412
|
*/
|
|
400
413
|
const toInverseSolver = toInverseSolver$1;
|
|
401
414
|
/**
|
|
415
|
+
* Returns the polynomial's coefficients as a tuple `[c0, c1, c2, c3]`.
|
|
416
|
+
*
|
|
417
|
+
* @param p - The cubic polynomial.
|
|
418
|
+
* @returns The coefficients in monomial order.
|
|
419
|
+
* @since 2.0.0
|
|
420
|
+
*/
|
|
421
|
+
const coefficients = coefficients$1;
|
|
422
|
+
/**
|
|
402
423
|
* Calculates the derivative of a cubic polynomial.
|
|
403
424
|
*
|
|
404
425
|
* @param p - The cubic polynomial to differentiate.
|
|
@@ -474,6 +495,6 @@ const range = range$1;
|
|
|
474
495
|
const length = length$1;
|
|
475
496
|
const curvature = curvature$1;
|
|
476
497
|
//#endregion
|
|
477
|
-
export {
|
|
498
|
+
export { equals$2 as $, GL32_X1 as A, isMonotonic$3 as At, GL32_X5 as B, GL32_W4 as C, equals$3 as Ct, GL32_W8 as D, isDecreasing$3 as Dt, GL32_W7 as E, fromVector$3 as Et, GL32_X14 as F, solve$3 as Ft, antiderivative as G, GL32_X7 as H, GL32_X15 as I, solveInverse$3 as It, asMonotonic$2 as J, asDecreasing$2 as K, GL32_X2 as L, toInverseSolver$3 as Lt, GL32_X11 as M, make$3 as Mt, GL32_X12 as N, monotonicity$3 as Nt, GL32_W9 as O, isIncreasing$3 as Ot, GL32_X13 as P, range$3 as Pt, domain$2 as Q, GL32_X3 as R, toSolver$3 as Rt, GL32_W3 as S, domain$3 as St, GL32_W6 as T, fromPoints$3 as Tt, GL32_X8 as U, GL32_X6 as V, GL32_X9 as W, curvature$2 as X, coefficients$2 as Y, derivative$2 as Z, GL32_W12 as _, asDecreasing$3 as _t, isIncreasing as a, isMonotonic$2 as at, GL32_W15 as b, coefficients$3 as bt, range as c, make$2 as ct, solveInverse as d, roots$2 as dt, extreme as et, subdivide as f, solve$2 as ft, GL32_W11 as g, antiderivative$1 as gt, GL32_W10 as h, toSolver$2 as ht, isDecreasing as i, isIncreasing$2 as it, GL32_X10 as j, length$3 as jt, GL32_X0 as k, isLinearPolynomial as kt, roots as l, monotonicity$2 as lt, GL32_W1 as m, toInverseSolver$2 as mt, derivative as n, fromVector$2 as nt, isMonotonic as o, isQuadraticPolynomial as ot, GL32_W0 as p, solveInverse$2 as pt, asIncreasing$2 as q, fromVector as r, isDecreasing$2 as rt, make as s, length$2 as st, cubic_exports as t, fromPoints$2 as tt, solve as u, range$2 as ut, GL32_W13 as v, asIncreasing$3 as vt, GL32_W5 as w, fromPointSlope as wt, GL32_W2 as x, derivative$3 as xt, GL32_W14 as y, asMonotonic$3 as yt, GL32_X4 as z };
|
|
478
499
|
|
|
479
|
-
//# sourceMappingURL=cubic-
|
|
500
|
+
//# sourceMappingURL=cubic-CMonq6bg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cubic-CMonq6bg.mjs","names":["equals","make","fromVector","fromPoints","solve","toSolver","solveInverse","Solution.none","Solution.one","toInverseSolver","monotonicity","isMonotonic","isIncreasing","isDecreasing","asMonotonic","asIncreasing","asDecreasing","coefficients","derivative","antiderivative","domain","Interval.make","Solution.isNone","range","Interval.fromMinMax","length","Interval.size","fromPoints","make","equals","fromVector","solve","toSolver","solveInverse","Linear.solveInverse","Linear.make","Solution.none","Solution.one","Solution.two","toInverseSolver","coefficients","derivative","roots","Solution.match","Vector2.make","monotonicity","Interval.size","Linear.monotonicity","Interval.contains","Interval.toOpen","isMonotonic","isIncreasing","isDecreasing","asMonotonic","asIncreasing","asDecreasing","domain","Interval.fromMinMax","range","Linear.range","length","Linear.length","Linear.solve","curvature","make","isCubicPolynomial","equals","fromVector","fromPoints","solve","toSolver","solveInverse","Quadratic.solveInverse","Quadratic.make","Solution.fromArray","toInverseSolver","coefficients","derivative","subdivide","roots","extrema","Quadratic.roots","monotonicity","Interval.size","Linear.monotonicity","Linear.make","Quadratic.monotonicity","Interval.filter","Interval.toOpen","isMonotonic","isIncreasing","isDecreasing","asMonotonic","asIncreasing","asDecreasing","domain","Interval.fromMinMax","range","length","Linear.length","Quadratic.length","Interval.scaleShift","Interval.biunit","Quadratic.solve","curvature","Quadratic.derivative","Linear.solve","internal.isCubicPolynomial","internal.equals","internal.make","internal.fromVector","internal.fromPoints","internal.solve","internal.toSolver","internal.solveInverse","internal.toInverseSolver","internal.coefficients","internal.derivative","internal.subdivide","internal.roots","internal.extrema","internal.monotonicity","internal.isMonotonic","internal.isIncreasing","internal.isDecreasing","internal.asMonotonic","internal.asIncreasing","internal.asDecreasing","internal.domain","internal.range","internal.length","internal.curvature"],"sources":["../../src/polynomial/quadratic.internal.circular.ts","../../src/polynomial/linear.internal.ts","../../src/polynomial/cubic.internal.circular.ts","../../src/polynomial/monotonicity.ts","../../src/polynomial/quadratic.internal.ts","../../src/length.ts","../../src/polynomial/cubic.internal.ts","../../src/polynomial/cubic.ts"],"sourcesContent":["import { Pipeable } from '../utils'\nimport type { QuadraticPolynomial } from './quadratic'\nimport { PolynomialTraits } from './traits'\n\nexport const QuadraticPolynomialTypeId: unique symbol = Symbol.for('curvy/polynomial/quadratic')\nexport type QuadraticPolynomialTypeId = typeof QuadraticPolynomialTypeId\n\nexport class QuadraticPolynomialImpl extends Pipeable implements QuadraticPolynomial<unknown> {\n readonly [QuadraticPolynomialTypeId]: QuadraticPolynomialTypeId = QuadraticPolynomialTypeId\n declare readonly [PolynomialTraits]: unknown\n\n readonly c0: number\n readonly c1: number\n readonly c2: number\n\n constructor(c0 = 0, c1 = 0, c2 = 0) {\n super()\n\n this.c0 = c0\n this.c1 = c1\n this.c2 = c2\n }\n}\n","import * as Interval from '../interval/interval'\nimport { dual, Pipeable } from '../utils'\nimport * as Solution from '../solution/solution'\nimport { invariant } from '../utils'\nimport { epsEquals } from '../number'\nimport type { Vector2 } from '../vector/vector2'\nimport type { LinearPolynomial } from './linear'\nimport type { Decreasing, Increasing, Monotonic } from './traits'\nimport { PolynomialTraits } from './traits'\nimport type { QuadraticPolynomial } from './quadratic'\nimport { QuadraticPolynomialImpl } from './quadratic.internal.circular'\n\nexport const LinearPolynomialTypeId: unique symbol = Symbol.for('curvy/linear')\nexport type LinearPolynomialTypeId = typeof LinearPolynomialTypeId\n\nclass LinearPolynomialImpl extends Pipeable implements LinearPolynomial<unknown> {\n readonly [LinearPolynomialTypeId]: LinearPolynomialTypeId = LinearPolynomialTypeId\n declare readonly [PolynomialTraits]: unknown\n\n readonly c0: number\n readonly c1: number\n\n constructor(c0 = 0, c1 = 0) {\n super()\n\n this.c0 = c0\n this.c1 = c1\n }\n}\n\nexport const isLinearPolynomial = (v: unknown): v is LinearPolynomial =>\n typeof v === 'object' && v !== null && LinearPolynomialTypeId in v\n\nexport const equals = dual<\n (b: LinearPolynomial) => (a: LinearPolynomial) => boolean,\n (a: LinearPolynomial, b: LinearPolynomial) => boolean\n>(2, (a: LinearPolynomial, b: LinearPolynomial) => epsEquals(a.c0, b.c0) && epsEquals(a.c1, b.c1))\n\nexport const make = (c0 = 0, c1 = 0): LinearPolynomial => new LinearPolynomialImpl(c0, c1)\n\nexport const fromVector = (v: Vector2) => new LinearPolynomialImpl(v.x, v.y)\n\nexport const fromPointSlope = (p: Vector2, slope: number) =>\n new LinearPolynomialImpl(p.y - slope * p.x, slope)\n\nexport const fromPoints = (p1: Vector2, p2: Vector2) =>\n fromPointSlope(p1, (p2.y - p1.y) / (p2.x - p1.x))\n\nexport const solve = dual<\n (x: number) => (p: LinearPolynomial) => number,\n (p: LinearPolynomial, x: number) => number\n>(2, (p: LinearPolynomial, x: number) => p.c0 + x * p.c1)\n\nexport const toSolver = (p: LinearPolynomial) => (x: number) => solve(p, x)\n\nexport const solveInverse = dual<\n (y: number) => (p: LinearPolynomial) => Solution.AtMostOne<number>,\n (p: LinearPolynomial, y: number) => Solution.AtMostOne<number>\n>(2, (p: LinearPolynomial, y: number) => {\n if (p.c1 === 0) {\n return Solution.none\n }\n return Solution.one((y - p.c0) / p.c1)\n})\n\nexport const toInverseSolver = (p: LinearPolynomial) => (y: number) => solveInverse(p, y)\n\nexport const monotonicity = (p: LinearPolynomial) =>\n p.c1 === 0 ? 'constant' : p.c1 > 0 ? 'increasing' : 'decreasing'\n\nexport const isMonotonic = <T>(p: LinearPolynomial<T>): p is LinearPolynomial<T & Monotonic> =>\n p.c1 !== 0\n\nexport const isIncreasing = <T>(p: LinearPolynomial<T>): p is LinearPolynomial<T & Increasing> =>\n p.c1 > 0\n\nexport const isDecreasing = <T>(p: LinearPolynomial<T>): p is LinearPolynomial<T & Decreasing> =>\n p.c1 < 0\n\nexport const asMonotonic = <T>(p: LinearPolynomial<T>): LinearPolynomial<T & Monotonic> => {\n invariant(isMonotonic(p), 'linear polynomial is not monotonic')\n return p\n}\n\nexport const asIncreasing = <T>(p: LinearPolynomial<T>): LinearPolynomial<T & Increasing> => {\n invariant(isIncreasing(p), 'linear polynomial is not increasing')\n return p\n}\n\nexport const asDecreasing = <T>(p: LinearPolynomial<T>): LinearPolynomial<T & Decreasing> => {\n invariant(isDecreasing(p), 'linear polynomial is not decreasing')\n return p\n}\n\nexport const coefficients = (p: LinearPolynomial): readonly [number, number] => [p.c0, p.c1]\n\nexport const derivative = (p: LinearPolynomial) => p.c1\n\nexport const antiderivative = dual<\n (integrationConstant: number) => (p: LinearPolynomial) => QuadraticPolynomial,\n (p: LinearPolynomial, integrationConstant?: number) => QuadraticPolynomial\n>(\n (args) => isLinearPolynomial(args[0]),\n (p: LinearPolynomial, integrationConstant = 0) =>\n new QuadraticPolynomialImpl(integrationConstant, p.c0, p.c1 / 2),\n)\n\nexport const domain = dual<\n (range: Interval.Interval) => (p: LinearPolynomial) => Solution.AtMostOne<Interval.Interval>,\n (p: LinearPolynomial, range: Interval.Interval) => Solution.AtMostOne<Interval.Interval>\n>(2, (p: LinearPolynomial, r: Interval.Interval) => {\n if (p.c1 === 0) {\n if (r.start === p.c0 && r.end === p.c0) {\n return Solution.one(Interval.make(Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY))\n }\n return Solution.none\n }\n\n const start = solveInverse(p, r.start)\n const end = solveInverse(p, r.end)\n\n if (Solution.isNone(start) || Solution.isNone(end)) {\n return Solution.none\n }\n\n return Solution.one(Interval.make(start.value, end.value))\n})\n\nexport const range = dual<\n (domain: Interval.Interval) => (p: LinearPolynomial) => Interval.Closed,\n (p: LinearPolynomial, domain: Interval.Interval) => Interval.Closed\n>(2, (p: LinearPolynomial, d: Interval.Interval) =>\n Interval.fromMinMax(solve(p, d.start), solve(p, d.end)),\n)\n\nexport const length = dual<\n (domain: Interval.Interval) => (p: LinearPolynomial) => number,\n (p: LinearPolynomial, domain: Interval.Interval) => number\n>(2, (p: LinearPolynomial, d: Interval.Interval) => {\n if (Interval.size(d) === 0) {\n return 0\n }\n\n if (p.c1 === 0) {\n return Interval.size(d)\n }\n\n return Math.sqrt(1 + p.c1 ** 2) * Interval.size(d)\n})\n","import { Pipeable } from '../utils'\nimport type { CubicPolynomial } from './cubic'\nimport { PolynomialTraits } from './traits'\n\nexport const CubicPolynomialTypeId: unique symbol = Symbol.for('curvy/polynomial/cubic')\nexport type CubicPolynomialTypeId = typeof CubicPolynomialTypeId\n\nexport class CubicPolynomialImpl extends Pipeable implements CubicPolynomial<unknown> {\n readonly [CubicPolynomialTypeId]: CubicPolynomialTypeId = CubicPolynomialTypeId\n declare readonly [PolynomialTraits]: unknown\n\n readonly c0: number\n readonly c1: number\n readonly c2: number\n readonly c3: number\n\n constructor(c0 = 0, c1 = 0, c2 = 0, c3 = 0) {\n super()\n\n this.c0 = c0\n this.c1 = c1\n this.c2 = c2\n this.c3 = c3\n }\n}\n","export type Monotonicity = 'none' | 'increasing' | 'decreasing' | 'constant'\nexport type GuaranteedMonotonicity = 'increasing' | 'decreasing' | 'constant'\n\nexport function guaranteedMonotonicityFromComparison(\n s0: number,\n s1: number,\n): GuaranteedMonotonicity {\n if (s0 < s1) {\n return 'increasing'\n }\n\n if (s0 > s1) {\n return 'decreasing'\n }\n\n return 'constant'\n}\n","import * as Interval from '../interval/interval'\nimport { dual } from '../utils'\nimport * as Solution from '../solution/solution'\nimport { invariant } from '../utils'\nimport { epsEquals } from '../number'\nimport * as Vector2 from '../vector/vector2'\nimport type { Vector3 } from '../vector/vector3'\nimport type { CubicPolynomial } from './cubic'\nimport { CubicPolynomialImpl } from './cubic.internal.circular'\nimport * as Linear from './linear.internal'\nimport { guaranteedMonotonicityFromComparison, type Monotonicity } from './monotonicity'\nimport type { QuadraticPolynomial } from './quadratic'\nimport { QuadraticPolynomialImpl, QuadraticPolynomialTypeId } from './quadratic.internal.circular'\nimport type { Decreasing, Increasing, Monotonic } from './traits'\n\nexport const fromPoints = (\n p0: Vector2.Vector2,\n p1: Vector2.Vector2,\n p2: Vector2.Vector2,\n): QuadraticPolynomial => {\n // Newton's divided differences, then collected to monomial form.\n const f01 = (p1.y - p0.y) / (p1.x - p0.x)\n const f12 = (p2.y - p1.y) / (p2.x - p1.x)\n const f012 = (f12 - f01) / (p2.x - p0.x)\n\n return new QuadraticPolynomialImpl(\n p0.y - f01 * p0.x + f012 * p0.x * p1.x,\n f01 - f012 * (p0.x + p1.x),\n f012,\n )\n}\n\nexport const make = (c0 = 0, c1 = 0, c2 = 0): QuadraticPolynomial =>\n new QuadraticPolynomialImpl(c0, c1, c2)\n\nexport const isQuadraticPolynomial = (v: unknown): v is QuadraticPolynomial =>\n typeof v === 'object' && v !== null && QuadraticPolynomialTypeId in v\n\nexport const equals = dual<\n (b: QuadraticPolynomial) => (a: QuadraticPolynomial) => boolean,\n (a: QuadraticPolynomial, b: QuadraticPolynomial) => boolean\n>(\n 2,\n (a: QuadraticPolynomial, b: QuadraticPolynomial) =>\n epsEquals(a.c0, b.c0) && epsEquals(a.c1, b.c1) && epsEquals(a.c2, b.c2),\n)\n\nexport const fromVector = (v: Vector3) => new QuadraticPolynomialImpl(v.x, v.y, v.z)\n\nexport const solve = dual<\n (x: number) => (p: QuadraticPolynomial) => number,\n (p: QuadraticPolynomial, x: number) => number\n>(2, (p: QuadraticPolynomial, x: number) => p.c0 + x * p.c1 + x ** 2 * p.c2)\n\nexport const toSolver = (p: QuadraticPolynomial) => (x: number) => solve(p, x)\n\nexport const solveInverse: {\n (p: QuadraticPolynomial, y: number): Solution.AtMostTwo<number>\n (y: number): (p: QuadraticPolynomial) => Solution.AtMostTwo<number>\n} = dual<\n (y: number) => (p: QuadraticPolynomial) => Solution.AtMostTwo<number>,\n (p: QuadraticPolynomial, y: number) => Solution.AtMostTwo<number>\n>(2, (p: QuadraticPolynomial, y: number) => {\n // c2 = 0: the polynomial is actually linear in disguise. Defer rather than\n // dividing by zero in the quadratic formula.\n if (p.c2 === 0) {\n return Linear.solveInverse(Linear.make(p.c0, p.c1), y)\n }\n\n const discriminant = p.c1 ** 2 - 4 * p.c2 * (p.c0 - y)\n\n if (discriminant < 0) {\n return Solution.none\n }\n\n if (discriminant === 0) {\n return Solution.one(-p.c1 / (2 * p.c2))\n }\n\n const sqrtDiscriminant = Math.sqrt(discriminant)\n const a = (-p.c1 + sqrtDiscriminant) / (2 * p.c2)\n const b = (-p.c1 - sqrtDiscriminant) / (2 * p.c2)\n return a < b ? Solution.two(a, b) : Solution.two(b, a)\n})\n\nexport const toInverseSolver =\n (p: QuadraticPolynomial) =>\n (y: number): Solution.AtMostTwo<number> =>\n solveInverse(p, y)\n\nexport const coefficients = (p: QuadraticPolynomial): readonly [number, number, number] => [\n p.c0,\n p.c1,\n p.c2,\n]\n\nexport const derivative = (p: QuadraticPolynomial) => Linear.make(p.c1, p.c2 * 2)\n\nexport const roots = (p: QuadraticPolynomial) => solveInverse(p, 0)\n\nexport const extreme = (p: QuadraticPolynomial) =>\n derivative(p).pipe(\n Linear.solveInverse(0),\n Solution.match({\n onNone: () => null,\n onSome: ({ value: t }) => Vector2.make(t, solve(p, t)),\n }),\n )\n\nexport const monotonicity = dual<\n (i: Interval.Interval) => (p: QuadraticPolynomial) => Monotonicity,\n (p: QuadraticPolynomial, i?: Interval.Interval) => Monotonicity\n>(\n (args) => isQuadraticPolynomial(args[0]),\n (p: QuadraticPolynomial, i?: Interval.Interval) => {\n invariant(\n i === undefined || Interval.size(i) > 0,\n 'monotonicity is undefined over a zero-width interval',\n )\n\n if (p.c2 === 0 && p.c1 === 0) {\n return 'constant'\n }\n\n if (p.c2 === 0) {\n return Linear.monotonicity(Linear.make(p.c0, p.c1))\n }\n\n // c2 is non-zero, so the extreme is guaranteed to be non-null\n const e = extreme(p) as Vector2.Vector2\n\n // if there is no interval, or the extreme is within the interval,\n // the monotonicity is none\n if (i === undefined || Interval.contains(Interval.toOpen(i), e.x)) {\n return 'none'\n }\n\n return guaranteedMonotonicityFromComparison(solve(p, i.start), solve(p, i.end))\n },\n)\n\nexport const isMonotonic = dual<\n (\n i: Interval.Interval,\n ) => <T>(p: QuadraticPolynomial<T>) => p is QuadraticPolynomial<T & Monotonic>,\n <T>(p: QuadraticPolynomial<T>, i?: Interval.Interval) => p is QuadraticPolynomial<T & Monotonic>\n>((args) => isQuadraticPolynomial(args[0]), ((p: QuadraticPolynomial, i?: Interval.Interval) => {\n const m = monotonicity(p, i as Interval.Interval)\n return m === 'increasing' || m === 'decreasing'\n}) as never)\n\nexport const isIncreasing = dual<\n (\n i: Interval.Interval,\n ) => <T>(p: QuadraticPolynomial<T>) => p is QuadraticPolynomial<T & Increasing>,\n <T>(p: QuadraticPolynomial<T>, i?: Interval.Interval) => p is QuadraticPolynomial<T & Increasing>\n>(\n (args) => isQuadraticPolynomial(args[0]),\n ((p: QuadraticPolynomial, i?: Interval.Interval) =>\n monotonicity(p, i as Interval.Interval) === 'increasing') as never,\n)\n\nexport const isDecreasing = dual<\n (\n i: Interval.Interval,\n ) => <T>(p: QuadraticPolynomial<T>) => p is QuadraticPolynomial<T & Decreasing>,\n <T>(p: QuadraticPolynomial<T>, i?: Interval.Interval) => p is QuadraticPolynomial<T & Decreasing>\n>(\n (args) => isQuadraticPolynomial(args[0]),\n ((p: QuadraticPolynomial, i?: Interval.Interval) =>\n monotonicity(p, i as Interval.Interval) === 'decreasing') as never,\n)\n\nexport const asMonotonic = <T>(\n p: QuadraticPolynomial<T>,\n i?: Interval.Interval,\n): QuadraticPolynomial<T & Monotonic> => {\n invariant(isMonotonic(p, i as Interval.Interval), 'quadratic polynomial is not monotonic')\n return p\n}\n\nexport const asIncreasing = <T>(\n p: QuadraticPolynomial<T>,\n i?: Interval.Interval,\n): QuadraticPolynomial<T & Increasing> => {\n invariant(isIncreasing(p, i as Interval.Interval), 'quadratic polynomial is not increasing')\n return p\n}\n\nexport const asDecreasing = <T>(\n p: QuadraticPolynomial<T>,\n i?: Interval.Interval,\n): QuadraticPolynomial<T & Decreasing> => {\n invariant(isDecreasing(p, i as Interval.Interval), 'quadratic polynomial is not decreasing')\n return p\n}\n\nexport const antiderivative = dual<\n (integrationConstant: number) => (p: QuadraticPolynomial) => CubicPolynomial,\n (p: QuadraticPolynomial, integrationConstant?: number) => CubicPolynomial\n>(\n 2,\n (p: QuadraticPolynomial, integrationConstant = 0) =>\n new CubicPolynomialImpl(integrationConstant, p.c0, p.c1 / 2, p.c2 / 3),\n)\n\nexport const domain = dual<\n (range: Interval.Interval) => (p: QuadraticPolynomial) => Solution.AtMostOne<Interval.Interval>,\n (p: QuadraticPolynomial, range: Interval.Interval) => Solution.AtMostOne<Interval.Interval>\n>(2, (p: QuadraticPolynomial, r: Interval.Interval) => {\n const start = solveInverse(p, r.start)\n const end = solveInverse(p, r.end)\n\n if (start.length === 0 && end.length === 0) {\n return Solution.none\n }\n\n return Solution.one(Interval.fromMinMax(...start, ...end))\n})\n\nexport const range = dual<\n (domain: Interval.Interval) => (p: QuadraticPolynomial) => Interval.Closed,\n (p: QuadraticPolynomial, domain: Interval.Interval) => Interval.Closed\n>(2, (p: QuadraticPolynomial, d: Interval.Interval) => {\n if (p.c2 === 0) {\n return Linear.range(Linear.make(p.c0, p.c1), d)\n }\n\n const e = extreme(p)\n\n return e !== null && Interval.contains(d, e.x)\n ? Interval.fromMinMax(solve(p, d.start), solve(p, d.end), e.y)\n : Interval.fromMinMax(solve(p, d.start), solve(p, d.end))\n})\n\nexport const length = dual<\n (domain: Interval.Interval) => (p: QuadraticPolynomial) => number,\n (p: QuadraticPolynomial, domain: Interval.Interval) => number\n>(2, (p: QuadraticPolynomial, dom: Interval.Interval) => {\n if (Interval.size(dom) === 0) {\n return 0\n }\n\n if (p.c2 === 0) {\n return Linear.length(Linear.make(p.c0, p.c1), dom)\n }\n\n const dp = derivative(p)\n\n const derivativeStart = Linear.solve(dp, dom.start)\n const sqrtStart = Math.sqrt(1 + derivativeStart ** 2)\n const evalStart =\n (derivativeStart * sqrtStart + Math.log(Math.abs(derivativeStart + sqrtStart))) / (4 * p.c2)\n\n const derivativeEnd = Linear.solve(dp, dom.end)\n const sqrtEnd = Math.sqrt(1 + derivativeEnd ** 2)\n const evalEnd =\n (derivativeEnd * sqrtEnd + Math.log(Math.abs(derivativeEnd + sqrtEnd))) / (4 * p.c2)\n\n return evalEnd - evalStart\n})\n\nexport const curvature = dual<\n (x: number) => (p: QuadraticPolynomial) => number,\n (p: QuadraticPolynomial, x: number) => number\n>(\n 2,\n (p: QuadraticPolynomial, x: number) =>\n Math.abs(2 * p.c2) / (1 + (Linear.solve(derivative(p), x) ** 2) ** 1.5),\n)\n","export const GL32_X0 = 0.9972638618494816\nexport const GL32_X1 = 0.9856115115452684\nexport const GL32_X2 = 0.9647622555875064\nexport const GL32_X3 = 0.9349060759377397\nexport const GL32_X4 = 0.8963211557660521\nexport const GL32_X5 = 0.84936761373257\nexport const GL32_X6 = 0.7944837959679424\nexport const GL32_X7 = 0.7321821187402897\nexport const GL32_X8 = 0.6630442669302152\nexport const GL32_X9 = 0.5877157572407623\nexport const GL32_X10 = 0.5068999089322294\nexport const GL32_X11 = 0.42135127613063533\nexport const GL32_X12 = 0.33186860228212767\nexport const GL32_X13 = 0.23928736225213706\nexport const GL32_X14 = 0.1444719615827965\nexport const GL32_X15 = 0.04830766568773831\nexport const GL32_W0 = 0.007018610009470136\nexport const GL32_W1 = 0.01627439473090571\nexport const GL32_W2 = 0.02539206530926214\nexport const GL32_W3 = 0.03427386291302141\nexport const GL32_W4 = 0.042835898022226704\nexport const GL32_W5 = 0.050998059262376154\nexport const GL32_W6 = 0.05868409347853558\nexport const GL32_W7 = 0.06582222277636195\nexport const GL32_W8 = 0.07234579410884862\nexport const GL32_W9 = 0.07819389578707044\nexport const GL32_W10 = 0.08331192422694672\nexport const GL32_W11 = 0.08765209300440374\nexport const GL32_W12 = 0.0911738786957639\nexport const GL32_W13 = 0.09384439908080454\nexport const GL32_W14 = 0.09563872007927485\nexport const GL32_W15 = 0.09654008851472785\n","import * as Interval from '../interval/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 { dual } from '../utils'\nimport * as Solution from '../solution/solution'\nimport { invariant } from '../utils'\nimport { clampToZero, epsEquals } from '../number'\nimport type * as Vector2 from '../vector/vector2'\nimport type { Vector4 } from '../vector/vector4'\nimport type { CubicPolynomial } from './cubic'\nimport { CubicPolynomialImpl, CubicPolynomialTypeId } from './cubic.internal.circular'\nimport type { Decreasing, Increasing, Monotonic } from './traits'\nimport * as Linear from './linear.internal'\nimport { guaranteedMonotonicityFromComparison, type Monotonicity } from './monotonicity'\nimport * as Quadratic from './quadratic.internal'\n\nexport const make = (c0 = 0, c1 = 0, c2 = 0, c3 = 0): CubicPolynomial =>\n new CubicPolynomialImpl(c0, c1, c2, c3)\n\nexport const isCubicPolynomial = (v: unknown): v is CubicPolynomial =>\n typeof v === 'object' && v !== null && CubicPolynomialTypeId in v\n\nexport const equals = dual<\n (b: CubicPolynomial) => (a: CubicPolynomial) => boolean,\n (a: CubicPolynomial, b: CubicPolynomial) => boolean\n>(\n 2,\n (a: CubicPolynomial, b: CubicPolynomial) =>\n epsEquals(a.c0, b.c0) &&\n epsEquals(a.c1, b.c1) &&\n epsEquals(a.c2, b.c2) &&\n epsEquals(a.c3, b.c3),\n)\n\nexport const fromVector = (v: Vector4) => new CubicPolynomialImpl(v.x, v.y, v.z, v.w)\n\nexport const fromPoints = (\n p0: Vector2.Vector2,\n p1: Vector2.Vector2,\n p2: Vector2.Vector2,\n p3: Vector2.Vector2,\n): CubicPolynomial => {\n // Newton's divided differences, then collected to monomial form.\n const f01 = (p1.y - p0.y) / (p1.x - p0.x)\n const f12 = (p2.y - p1.y) / (p2.x - p1.x)\n const f23 = (p3.y - p2.y) / (p3.x - p2.x)\n const f012 = (f12 - f01) / (p2.x - p0.x)\n const f123 = (f23 - f12) / (p3.x - p1.x)\n const f0123 = (f123 - f012) / (p3.x - p0.x)\n\n return new CubicPolynomialImpl(\n p0.y - f01 * p0.x + f012 * p0.x * p1.x - f0123 * p0.x * p1.x * p2.x,\n f01 - f012 * (p0.x + p1.x) + f0123 * (p0.x * p1.x + p0.x * p2.x + p1.x * p2.x),\n f012 - f0123 * (p0.x + p1.x + p2.x),\n f0123,\n )\n}\n\nexport const solve = dual<\n (x: number) => (p: CubicPolynomial) => number,\n (p: CubicPolynomial, x: number) => number\n>(2, (p: CubicPolynomial, x: number) => p.c0 + x * p.c1 + x ** 2 * p.c2 + x ** 3 * p.c3)\n\nexport const toSolver = (p: CubicPolynomial) => (x: number) => solve(p, x)\n\nexport const solveInverse = dual<\n (y: number) => (p: CubicPolynomial) => Solution.AtMostThree<number>,\n (p: CubicPolynomial, y: number) => Solution.AtMostThree<number>\n>(2, (self: CubicPolynomial, y: number) => {\n // c3 = 0: the polynomial is actually quadratic-or-less in disguise. Defer to\n // the quadratic solver (which itself handles c2 = 0 by deferring to linear).\n if (self.c3 === 0) {\n return Quadratic.solveInverse(Quadratic.make(self.c0, self.c1, self.c2), y)\n }\n\n const shift = self.c2 / (3 * self.c3)\n\n const d0 = self.c2 ** 2 - 3 * self.c3 * self.c1\n const d1 = 2 * self.c2 ** 3 - 9 * self.c3 * self.c2 * self.c1 + 27 * self.c3 ** 2 * (self.c0 - y)\n\n const p = -d0 / (3 * self.c3 ** 2)\n const q = d1 / (27 * self.c3 ** 3)\n\n const discriminant = clampToZero(-(4 * p ** 3 + 27 * q ** 2), 1e-12)\n\n const roots = new Set<number>()\n\n if (discriminant > 0) {\n const r = 2 * Math.sqrt(-p / 3)\n const theta = Math.acos(((3 * q) / (2 * p)) * Math.sqrt(-3 / p)) / 3\n const offset = (2 * Math.PI) / 3\n\n roots.add(r * Math.cos(theta + offset) - shift)\n roots.add(r * Math.cos(theta) - shift)\n roots.add(r * Math.cos(theta - offset) - shift)\n } else if (discriminant < 0) {\n const u = Math.sqrt(q ** 2 / 4 + p ** 3 / 27)\n\n const u1 = Math.cbrt(-q / 2 + u)\n const u2 = Math.cbrt(-q / 2 - u)\n\n roots.add(u1 + u2 - shift)\n } else if (d0 === 0) {\n roots.add(-shift)\n } else {\n roots.add((9 * self.c3 * (self.c0 - y) - self.c2 * self.c1) / (2 * d0))\n roots.add(\n (4 * self.c3 * self.c2 * self.c1 - 9 * self.c3 ** 2 * (self.c0 - y) - self.c2 ** 3) /\n (self.c3 * d0),\n )\n }\n\n return Solution.fromArray(Array.from(roots).toSorted((a, b) => a - b))\n})\n\nexport const toInverseSolver = (p: CubicPolynomial) => (y: number) => solveInverse(p, y)\n\nexport const coefficients = (\n p: CubicPolynomial,\n): readonly [number, number, number, number] => [p.c0, p.c1, p.c2, p.c3]\n\nexport const derivative = (p: CubicPolynomial) => Quadratic.make(p.c1, p.c2 * 2, p.c3 * 3)\n\n// Subdivides a cubic polynomial at parameter `t ∈ (0, 1)` into two new cubic\n// polynomials. The first polynomial's evaluation on `[0, 1]` matches the\n// original's evaluation on `[0, t]`; the second matches the original's\n// evaluation on `[t, 1]`. Concretely: `left(u) = p(t·u)` and\n// `right(u) = p(t + (1-t)·u)`. The left half is a uniform scale of the input\n// parameter by powers of `t`; the right half is a binomial expansion in\n// `(s + r·u)` with `s = t` and `r = 1 - t`.\nexport const subdivide = dual<\n (t: number) => (p: CubicPolynomial) => [CubicPolynomial, CubicPolynomial],\n (p: CubicPolynomial, t: number) => [CubicPolynomial, CubicPolynomial]\n>(2, (p: CubicPolynomial, t: number): [CubicPolynomial, CubicPolynomial] => {\n invariant(t > 0 && t < 1, 'subdivide parameter t must be in the open interval (0, 1)')\n\n const r = 1 - t\n const left = make(p.c0, p.c1 * t, p.c2 * t * t, p.c3 * t * t * t)\n const right = make(\n p.c0 + p.c1 * t + p.c2 * t * t + p.c3 * t * t * t,\n p.c1 * r + 2 * p.c2 * t * r + 3 * p.c3 * t * t * r,\n p.c2 * r * r + 3 * p.c3 * t * r * r,\n p.c3 * r * r * r,\n )\n return [left, right]\n})\n\nexport const roots = (p: CubicPolynomial): Solution.AtMostThree<number> => solveInverse(p, 0)\n\nexport const extrema = (p: CubicPolynomial): Solution.AtMostTwo<number> =>\n Quadratic.roots(derivative(p))\n\nexport const monotonicity = dual<\n (i: Interval.Interval) => (p: CubicPolynomial) => Monotonicity,\n (p: CubicPolynomial, i?: Interval.Interval) => Monotonicity\n>(\n (args) => isCubicPolynomial(args[0]),\n (p: CubicPolynomial, i?: Interval.Interval) => {\n invariant(\n i === undefined || Interval.size(i) > 0,\n 'monotonicity is undefined over a zero-width interval',\n )\n\n // shortcut to check for a horizontal line\n if (p.c3 === 0 && p.c2 === 0 && p.c1 === 0) {\n return 'constant'\n }\n\n // shortcut to check for a non-horizontal line\n if (p.c3 === 0 && p.c2 === 0) {\n return Linear.monotonicity(Linear.make(p.c0, p.c1))\n }\n\n // without an interval, the monotonicity will be none if c3 or c2 are nonzero\n if (i === undefined) {\n return 'none'\n }\n\n if (p.c3 === 0) {\n return Quadratic.monotonicity(Quadratic.make(p.c0, p.c1, p.c2), i)\n }\n\n const e = Interval.filter(Interval.toOpen(i), [...extrema(p)])\n\n if (e.length > 0) {\n return 'none'\n }\n\n return guaranteedMonotonicityFromComparison(solve(p, i.start), solve(p, i.end))\n },\n)\n\nexport const isMonotonic = dual<\n (i: Interval.Interval) => <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Monotonic>,\n <T>(p: CubicPolynomial<T>, i?: Interval.Interval) => p is CubicPolynomial<T & Monotonic>\n>((args) => isCubicPolynomial(args[0]), ((p: CubicPolynomial, i?: Interval.Interval) => {\n const m = monotonicity(p, i as Interval.Interval)\n return m === 'increasing' || m === 'decreasing'\n}) as never)\n\nexport const isIncreasing = dual<\n (i: Interval.Interval) => <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Increasing>,\n <T>(p: CubicPolynomial<T>, i?: Interval.Interval) => p is CubicPolynomial<T & Increasing>\n>(\n (args) => isCubicPolynomial(args[0]),\n ((p: CubicPolynomial, i?: Interval.Interval) =>\n monotonicity(p, i as Interval.Interval) === 'increasing') as never,\n)\n\nexport const isDecreasing = dual<\n (i: Interval.Interval) => <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Decreasing>,\n <T>(p: CubicPolynomial<T>, i?: Interval.Interval) => p is CubicPolynomial<T & Decreasing>\n>(\n (args) => isCubicPolynomial(args[0]),\n ((p: CubicPolynomial, i?: Interval.Interval) =>\n monotonicity(p, i as Interval.Interval) === 'decreasing') as never,\n)\n\nexport const asMonotonic = <T>(\n p: CubicPolynomial<T>,\n i?: Interval.Interval,\n): CubicPolynomial<T & Monotonic> => {\n invariant(isMonotonic(p, i as Interval.Interval), 'cubic polynomial is not monotonic')\n return p\n}\n\nexport const asIncreasing = <T>(\n p: CubicPolynomial<T>,\n i?: Interval.Interval,\n): CubicPolynomial<T & Increasing> => {\n invariant(isIncreasing(p, i as Interval.Interval), 'cubic polynomial is not increasing')\n return p\n}\n\nexport const asDecreasing = <T>(\n p: CubicPolynomial<T>,\n i?: Interval.Interval,\n): CubicPolynomial<T & Decreasing> => {\n invariant(isDecreasing(p, i as Interval.Interval), 'cubic polynomial is not decreasing')\n return p\n}\n\nexport const domain = dual<\n (range: Interval.Interval) => (p: CubicPolynomial) => Interval.Interval,\n (p: CubicPolynomial, range: Interval.Interval) => Interval.Interval\n>(2, (p: CubicPolynomial, r: Interval.Interval) =>\n Interval.fromMinMax(...solveInverse(p, r.start), ...solveInverse(p, r.end)),\n)\n\nexport const range = dual<\n (domain: Interval.Interval) => (p: CubicPolynomial) => Interval.Closed,\n (p: CubicPolynomial, domain: Interval.Interval) => Interval.Closed\n>(2, (p: CubicPolynomial, d: Interval.Interval) =>\n Interval.fromMinMax(\n solve(p, d.start),\n solve(p, d.end),\n ...Interval.filter(d, [...extrema(p)]).map((e) => solve(p, e)),\n ),\n)\n\nexport const length = dual<\n (domain: Interval.Interval) => (p: CubicPolynomial) => number,\n (p: CubicPolynomial, domain: Interval.Interval) => number\n>(2, (p: CubicPolynomial, dom: Interval.Interval) => {\n if (Interval.size(dom) === 0) {\n return 0\n }\n\n if (p.c3 === 0) {\n if (p.c2 === 0) {\n return Linear.length(Linear.make(p.c0, p.c1), dom)\n }\n\n return Quadratic.length(Quadratic.make(p.c0, p.c1, p.c2), dom)\n }\n\n const d = derivative(p)\n\n const { scale, shift } = Interval.scaleShift(Interval.biunit, dom)\n\n return (\n (GL32_W0 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X0) ** 2) +\n GL32_W0 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X0) ** 2) +\n GL32_W1 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X1) ** 2) +\n GL32_W1 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X1) ** 2) +\n GL32_W2 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X2) ** 2) +\n GL32_W2 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X2) ** 2) +\n GL32_W3 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X3) ** 2) +\n GL32_W3 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X3) ** 2) +\n GL32_W4 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X4) ** 2) +\n GL32_W4 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X4) ** 2) +\n GL32_W5 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X5) ** 2) +\n GL32_W5 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X5) ** 2) +\n GL32_W6 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X6) ** 2) +\n GL32_W6 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X6) ** 2) +\n GL32_W7 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X7) ** 2) +\n GL32_W7 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X7) ** 2) +\n GL32_W8 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X8) ** 2) +\n GL32_W8 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X8) ** 2) +\n GL32_W9 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X9) ** 2) +\n GL32_W9 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X9) ** 2) +\n GL32_W10 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X10) ** 2) +\n GL32_W10 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X10) ** 2) +\n GL32_W11 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X11) ** 2) +\n GL32_W11 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X11) ** 2) +\n GL32_W12 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X12) ** 2) +\n GL32_W12 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X12) ** 2) +\n GL32_W13 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X13) ** 2) +\n GL32_W13 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X13) ** 2) +\n GL32_W14 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X14) ** 2) +\n GL32_W14 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X14) ** 2) +\n GL32_W15 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * -GL32_X15) ** 2) +\n GL32_W15 * Math.sqrt(1 + Quadratic.solve(d, shift + scale * GL32_X15) ** 2)) *\n scale\n )\n})\n\nexport const curvature = dual(2, (p: CubicPolynomial, x: number) => {\n const d = derivative(p)\n const dd = Quadratic.derivative(d)\n\n return Math.abs(Linear.solve(dd, x)) / (1 + Quadratic.solve(d, x) ** 2) ** 1.5\n})\n","import type { Closed, Interval } from '../interval/interval'\nimport type { Pipeable } from '../utils'\nimport type * as Solution from '../solution/solution'\nimport type { Vector2 } from '../vector/vector2'\nimport type { Vector4 } from '../vector/vector4'\nimport * as internal from './cubic.internal'\nimport type { CubicPolynomialTypeId } from './cubic.internal.circular'\nimport type { Monotonicity } from './monotonicity'\nimport type { QuadraticPolynomial } from './quadratic'\nimport type { Decreasing, Increasing, Monotonic, PolynomialTraits } from './traits'\n\nexport type { Monotonic, Increasing, Decreasing } from './traits'\n\n/**\n * A cubic polynomial.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * The `Traits` type parameter is a phantom marker that accumulates trait\n * brands as the polynomial is refined via `isMonotonic` / `asMonotonic` and\n * friends. A cubic is monotonic only over an interval that avoids both of its\n * extrema (or globally, when c2 = c3 = 0 and c1 ≠ 0).\n *\n * @since 1.0.0\n */\nexport interface CubicPolynomial<out Traits = unknown> extends Pipeable {\n readonly [CubicPolynomialTypeId]: CubicPolynomialTypeId\n readonly [PolynomialTraits]: Traits\n\n /**\n * The coefficient of the x^0 term.\n */\n readonly c0: number\n /**\n * The coefficient of the x^1 term.\n */\n readonly c1: number\n /**\n * The coefficient of the x^2 term.\n */\n readonly c2: number\n /**\n * The coefficient of the x^3 term.\n */\n readonly c3: number\n}\n\n/**\n * Checks if a value is a `CubicPolynomial`.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a `CubicPolynomial`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isCubicPolynomial: (value: unknown) => value is CubicPolynomial =\n internal.isCubicPolynomial\n\nexport const equals: {\n /**\n * Checks if two `CubicPolynomial` instances are approximately equal within\n * the default absolute tolerance ({@link EPSILON}).\n *\n * @param a - The first polynomial.\n * @param b - The second polynomial.\n * @returns `true` when each pair of coefficients is within tolerance.\n * @since 1.1.0\n */\n (a: CubicPolynomial, b: CubicPolynomial): boolean\n /**\n * Checks if two `CubicPolynomial` instances are approximately equal within\n * the default absolute tolerance ({@link EPSILON}).\n *\n * @param b - The second polynomial.\n * @returns A function that takes the first polynomial and returns the comparison result.\n * @since 1.1.0\n */\n (b: CubicPolynomial): (a: CubicPolynomial) => boolean\n} = internal.equals\n\n/**\n * Creates a new `CubicPolynomial` instance.\n *\n * @param c0 - The coefficient of the x^0 term.\n * @param c1 - The coefficient of the x^1 term.\n * @param c2 - The coefficient of the x^2 term.\n * @param c3 - The coefficient of the x^3 term.\n */\nexport const make: (c0: number, c1: number, c2: number, c3: number) => CubicPolynomial =\n internal.make\n\n/**\n * Creates a new `CubicPolynomial` instance from a vector.\n *\n * @param v - The vector to convert.\n * @returns A new `CubicPolynomial` instance.\n * @since 1.0.0\n */\nexport const fromVector: (v: Vector4) => CubicPolynomial = internal.fromVector\n\n/**\n * Creates a new `CubicPolynomial` that interpolates the four given points,\n * treating each `Vector2` as an `(x, y)` pair. The four input `x` values must\n * be distinct.\n *\n * @param p0 - The first point.\n * @param p1 - The second point.\n * @param p2 - The third point.\n * @param p3 - The fourth point.\n * @returns The unique cubic polynomial passing through the four points.\n * @since 2.0.0\n */\nexport const fromPoints: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => CubicPolynomial =\n internal.fromPoints\n\nexport const solve: {\n /**\n * Solves a cubic polynomial for a given value of x.\n *\n * @param p - The cubic polynomial to solve.\n * @param x - The value of x to solve for.\n * @returns The result of the polynomial evaluation at x.\n * @since 1.0.0\n */\n (p: CubicPolynomial, x: number): number\n /**\n * Solves a cubic polynomial for a given value of x.\n *\n * @param x - The value of x to solve for.\n * @returns A function that takes a cubic polynomial and returns the result of the polynomial evaluation at x.\n * @since 1.0.0\n */\n (x: number): (p: CubicPolynomial) => number\n} = internal.solve\n\n/**\n * Converts a cubic polynomial to a solver function.\n *\n * @param p - The cubic polynomial to convert.\n * @returns A function that takes a value of x and returns the result of the polynomial evaluation at x.\n * @since 1.0.0\n */\nexport const toSolver: (p: CubicPolynomial) => (x: number) => number = internal.toSolver\n\nexport const solveInverse: {\n /**\n * Solves a monotonic cubic polynomial for a given value of y. Because the\n * polynomial is strictly monotonic, the inverse has at most one solution.\n *\n * @param p - The monotonic cubic polynomial.\n * @param y - The value of y to solve for.\n * @returns Zero or one solutions.\n * @since 2.0.0\n */\n <T extends Monotonic>(p: CubicPolynomial<T>, y: number): Solution.AtMostOne<number>\n /**\n * Solves a cubic polynomial for a given value of y.\n *\n * @param p - The cubic polynomial to solve.\n * @param y - The value of y to solve for.\n * @returns The roots of the polynomial equation p(x) = y.\n * @since 1.0.0\n */\n <T>(p: CubicPolynomial<T>, y: number): Solution.AtMostThree<number>\n /**\n * Solves a cubic polynomial for a given value of y.\n *\n * @param y - The value of y to solve for.\n * @returns A function that takes a cubic polynomial and returns the roots\n * of the polynomial equation p(x) = y. Tightens to `Solution.AtMostOne<number>` for\n * monotonic inputs.\n * @since 1.0.0\n */\n (y: number): {\n <T extends Monotonic>(p: CubicPolynomial<T>): Solution.AtMostOne<number>\n <T>(p: CubicPolynomial<T>): Solution.AtMostThree<number>\n }\n} = internal.solveInverse as never\n\n/**\n * Converts a cubic polynomial to an inverse solver function.\n *\n * @param p - The cubic polynomial to convert.\n * @returns A function that takes a value of y and returns the roots of the polynomial equation p(x) = y.\n * @since 1.0.0\n */\nexport const toInverseSolver: (p: CubicPolynomial) => (y: number) => Solution.AtMostThree<number> =\n internal.toInverseSolver\n\n/**\n * Returns the polynomial's coefficients as a tuple `[c0, c1, c2, c3]`.\n *\n * @param p - The cubic polynomial.\n * @returns The coefficients in monomial order.\n * @since 2.0.0\n */\nexport const coefficients: (\n p: CubicPolynomial,\n) => readonly [number, number, number, number] = internal.coefficients\n\n/**\n * Calculates the derivative of a cubic polynomial.\n *\n * @param p - The cubic polynomial to differentiate.\n * @returns The derivative of the cubic polynomial.\n * @since 1.0.0\n */\nexport const derivative: (p: CubicPolynomial) => QuadraticPolynomial = internal.derivative\n\nexport const subdivide: {\n /**\n * Subdivides a cubic polynomial at parameter `t ∈ (0, 1)` into two new\n * cubic polynomials. The first polynomial's evaluation on `[0, 1]` matches\n * the original's on `[0, t]`; the second matches the original's on\n * `[t, 1]`. Equivalent to de Casteljau subdivision in Bernstein form,\n * performed directly in monomial form.\n *\n * @param p - The cubic polynomial to subdivide.\n * @param t - The split parameter; must be in the open interval `(0, 1)`.\n * @returns A `[left, right]` tuple of cubic polynomials.\n * @since 2.0.0\n */\n (p: CubicPolynomial, t: number): [CubicPolynomial, CubicPolynomial]\n /**\n * Subdivides a cubic polynomial at parameter `t ∈ (0, 1)`.\n *\n * @param t - The split parameter; must be in the open interval `(0, 1)`.\n * @returns A function that takes a polynomial and returns its `[left, right]` halves.\n * @since 2.0.0\n */\n (t: number): (p: CubicPolynomial) => [CubicPolynomial, CubicPolynomial]\n} = internal.subdivide\n\n/**\n * Calculates the roots of a cubic polynomial.\n *\n * @param p - The cubic polynomial to find the roots of.\n * @returns The roots of the cubic polynomial.\n * @since 1.0.0\n */\nexport const roots: (p: CubicPolynomial) => Solution.AtMostThree<number> = internal.roots\n\n/**\n * Calculates the extrema of a cubic polynomial.\n *\n * @param p - The cubic polynomial to find the extrema of.\n * @returns The extrema of the cubic polynomial.\n * @since 1.0.0\n */\nexport const extrema: (p: CubicPolynomial) => Solution.AtMostTwo<number> = internal.extrema\n\nexport const monotonicity: {\n /**\n * Calculates the monotonicity of a cubic polynomial. Throws when the\n * interval has zero width — the question is undefined at a single point.\n *\n * @param p - The cubic polynomial to analyze.\n * @param i - The interval to restrict the analysis to.\n * @returns The monotonicity of the cubic polynomial in the specified interval.\n * @since 1.0.0\n */\n (p: CubicPolynomial, i?: Interval): Monotonicity\n /**\n * Calculates the monotonicity of a cubic polynomial. Throws when the\n * interval has zero width.\n *\n * @param i - The interval to restrict the analysis to.\n * @returns A function that takes a cubic polynomial and returns the\n * monotonicity of the cubic polynomial in the specified interval.\n * @since 1.0.0\n */\n (i: Interval): (p: CubicPolynomial) => Monotonicity\n} = internal.monotonicity\n\n/**\n * Type-narrowing predicate: refines a `CubicPolynomial<T>` to\n * `CubicPolynomial<T & Monotonic>` when the polynomial is strictly monotonic\n * over the given interval (or globally, when no interval is given).\n *\n * @param p - The cubic polynomial to check.\n * @param i - Optional interval over which to check monotonicity.\n * @returns `true` when monotonicity is `'increasing'` or `'decreasing'`.\n * @since 2.0.0\n */\nexport const isMonotonic: {\n <T>(p: CubicPolynomial<T>, i?: Interval): p is CubicPolynomial<T & Monotonic>\n (i: Interval): <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Monotonic>\n} = internal.isMonotonic\n\n/**\n * Type-narrowing predicate: refines to `CubicPolynomial<T & Increasing>`.\n *\n * @since 2.0.0\n */\nexport const isIncreasing: {\n <T>(p: CubicPolynomial<T>, i?: Interval): p is CubicPolynomial<T & Increasing>\n (i: Interval): <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Increasing>\n} = internal.isIncreasing\n\n/**\n * Type-narrowing predicate: refines to `CubicPolynomial<T & Decreasing>`.\n *\n * @since 2.0.0\n */\nexport const isDecreasing: {\n <T>(p: CubicPolynomial<T>, i?: Interval): p is CubicPolynomial<T & Decreasing>\n (i: Interval): <T>(p: CubicPolynomial<T>) => p is CubicPolynomial<T & Decreasing>\n} = internal.isDecreasing\n\n/**\n * Asserts that the cubic polynomial is monotonic, throwing on failure.\n *\n * @param p - The cubic polynomial to assert against.\n * @param i - Optional interval over which to check monotonicity.\n * @returns The same polynomial, typed with the `Monotonic` brand.\n * @throws When the polynomial is not monotonic over the given (or global) interval.\n * @since 2.0.0\n */\nexport const asMonotonic: <T>(\n p: CubicPolynomial<T>,\n i?: Interval,\n) => CubicPolynomial<T & Monotonic> = internal.asMonotonic\n\n/**\n * Asserts that the cubic polynomial is increasing, throwing on failure.\n *\n * @since 2.0.0\n */\nexport const asIncreasing: <T>(\n p: CubicPolynomial<T>,\n i?: Interval,\n) => CubicPolynomial<T & Increasing> = internal.asIncreasing\n\n/**\n * Asserts that the cubic polynomial is decreasing, throwing on failure.\n *\n * @since 2.0.0\n */\nexport const asDecreasing: <T>(\n p: CubicPolynomial<T>,\n i?: Interval,\n) => CubicPolynomial<T & Decreasing> = internal.asDecreasing\n\nexport const domain: {\n /**\n * Calculates the domain of a cubic polynomial.\n *\n * @param p - The cubic polynomial to analyze.\n * @param range - The range to restrict the analysis to.\n * @returns The domain of the cubic polynomial in the specified range.\n * @since 1.0.0\n */\n (p: CubicPolynomial, range: Interval): Interval\n /**\n * Calculates the domain of a cubic polynomial.\n *\n * @param range - The range to restrict the analysis to.\n * @returns A function that takes a cubic polynomial and returns the domain of the cubic polynomial in the specified range.\n * @since 1.0.0\n */\n (range: Interval): (p: CubicPolynomial) => Interval\n} = internal.domain\n\nexport const range: {\n /**\n * Calculates the range of a cubic polynomial.\n *\n * @param p - The cubic polynomial to analyze.\n * @param domain - The domain to restrict the analysis to.\n * @returns The range of the cubic polynomial in the specified domain.\n * @since 1.0.0\n */\n (p: CubicPolynomial, domain: Interval): Closed\n /**\n * Calculates the range of a cubic polynomial.\n *\n * @param domain - The domain to restrict the analysis to.\n * @returns A function that takes a cubic polynomial and returns the range of the cubic polynomial in the specified domain.\n * @since 1.0.0\n */\n (domain: Interval): (p: CubicPolynomial) => Closed\n} = internal.range\n\nexport const length: {\n /**\n * Calculates the length of a cubic polynomial.\n *\n * @param p - The cubic polynomial to analyze.\n * @param domain - The domain to restrict the analysis to.\n * @returns The length of the cubic polynomial in the specified domain.\n * @since 1.0.0\n */\n (p: CubicPolynomial, domain: Interval): number\n /**\n * Calculates the length of a cubic polynomial.\n *\n * @param domain - The domain to restrict the analysis to.\n * @returns A function that takes a cubic polynomial and returns the length of the cubic polynomial in the specified domain.\n * @since 1.0.0\n */\n (domain: Interval): (p: CubicPolynomial) => number\n} = internal.length\n\nexport const curvature: {\n /**\n * Calculates the curvature of a cubic polynomial.\n *\n * @param p - The cubic polynomial to analyze.\n * @param x - The value of x to calculate the curvature at.\n * @returns The curvature of the cubic polynomial at the specified value of x.\n * @since 1.0.0\n */\n (p: CubicPolynomial, x: number): number\n /**\n * Calculates the curvature of a cubic polynomial.\n *\n * @param x - The value of x to calculate the curvature at.\n * @returns A function that takes a cubic polynomial and returns the curvature of the cubic polynomial at the specified value of x.\n * @since 1.0.0\n */\n (x: number): (p: CubicPolynomial) => number\n} = internal.curvature\n"],"mappings":";;;;;;;AAIA,MAAa,4BAA2C,OAAO,IAAI,6BAA6B;AAGhG,IAAa,0BAAb,cAA6C,SAAiD;CAC5F,CAAU,6BAAwD;CAGlE;CACA;CACA;CAEA,YAAY,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG;EAClC,OAAO;EAEP,KAAK,KAAK;EACV,KAAK,KAAK;EACV,KAAK,KAAK;;;;;ACRd,MAAa,yBAAwC,OAAO,IAAI,eAAe;AAG/E,IAAM,uBAAN,cAAmC,SAA8C;CAC/E,CAAU,0BAAkD;CAG5D;CACA;CAEA,YAAY,KAAK,GAAG,KAAK,GAAG;EAC1B,OAAO;EAEP,KAAK,KAAK;EACV,KAAK,KAAK;;;AAId,MAAa,sBAAsB,MACjC,OAAO,MAAM,YA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AI3B,aAAW,EAAE;CACvB,MAAM,KAAK4B,aAAqB,EAAE;CAElC,OAAO,KAAK,IAAIC,QAAa,IAAI,EAAE,CAAC,IAAI,IAAIH,QAAgB,GAAG,EAAE,IAAI,MAAM;EAC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5SF,MAAa,oBACXI;AAEF,MAAa,SAoBTC;;;;;;;;;AAUJ,MAAa,OACXC;;;;;;;;AASF,MAAa,aAA8CC;;;;;;;;;;;;;AAc3D,MAAa,aACXC;AAEF,MAAa,QAkBTC;;;;;;;;AASJ,MAAa,WAA0DC;AAEvE,MAAa,eAiCTC;;;;;;;;AASJ,MAAa,kBACXC;;;;;;;;AASF,MAAa,eAEoCC;;;;;;;;AASjD,MAAa,aAA0DC;AAEvE,MAAa,YAsBTC;;;;;;;;AASJ,MAAa,QAA8DC;;;;;;;;AAS3E,MAAa,UAA8DC;AAE3E,MAAa,eAqBTC;;;;;;;;;;;AAYJ,MAAa,cAGTC;;;;;;AAOJ,MAAa,eAGTC;;;;;;AAOJ,MAAa,eAGTC;;;;;;;;;;AAWJ,MAAa,cAGyBC;;;;;;AAOtC,MAAa,eAG0BC;;;;;;AAOvC,MAAa,eAG0BC;AAEvC,MAAa,SAkBTC;AAEJ,MAAa,QAkBTC;AAEJ,MAAa,SAkBTC;AAEJ,MAAa,YAkBTC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { t as Pipeable } from "./utils-MCckigYk.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/polynomial/traits.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Phantom property key used by polynomial interfaces to hold their `Traits`
|
|
6
|
+
* type parameter. The runtime object never has a value at this key — the
|
|
7
|
+
* `declare` modifier on the impl class makes the property type-visible only.
|
|
8
|
+
* The symbol itself is exported as a real value so that bundlers can resolve
|
|
9
|
+
* the computed key reference even though the property is never assigned.
|
|
10
|
+
*
|
|
11
|
+
* @since 2.0.0
|
|
12
|
+
*/
|
|
13
|
+
declare const PolynomialTraits: unique symbol;
|
|
14
|
+
type PolynomialTraits = typeof PolynomialTraits;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/polynomial/cubic.internal.circular.d.ts
|
|
17
|
+
declare const CubicPolynomialTypeId: unique symbol;
|
|
18
|
+
type CubicPolynomialTypeId = typeof CubicPolynomialTypeId;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/polynomial/linear.internal.d.ts
|
|
21
|
+
declare const LinearPolynomialTypeId: unique symbol;
|
|
22
|
+
type LinearPolynomialTypeId = typeof LinearPolynomialTypeId;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/polynomial/linear.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* A linear polynomial.
|
|
27
|
+
*
|
|
28
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
29
|
+
*
|
|
30
|
+
* The `Traits` type parameter is a phantom marker that accumulates trait
|
|
31
|
+
* brands as the polynomial is refined via `isMonotonic` / `asMonotonic` and
|
|
32
|
+
* friends. The runtime value carries no trait data — `Traits` only flows
|
|
33
|
+
* through the type system to enable tighter return types on operations like
|
|
34
|
+
* `solveInverse`.
|
|
35
|
+
*
|
|
36
|
+
* @since 1.0.0
|
|
37
|
+
*/
|
|
38
|
+
interface LinearPolynomial<out Traits = unknown> extends Pipeable {
|
|
39
|
+
readonly [LinearPolynomialTypeId]: LinearPolynomialTypeId;
|
|
40
|
+
readonly [PolynomialTraits]: Traits;
|
|
41
|
+
/**
|
|
42
|
+
* The coefficient of the x^0 term.
|
|
43
|
+
*/
|
|
44
|
+
readonly c0: number;
|
|
45
|
+
/**
|
|
46
|
+
* The coefficient of the x^1 term.
|
|
47
|
+
*/
|
|
48
|
+
readonly c1: number;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/polynomial/quadratic.internal.circular.d.ts
|
|
52
|
+
declare const QuadraticPolynomialTypeId: unique symbol;
|
|
53
|
+
type QuadraticPolynomialTypeId = typeof QuadraticPolynomialTypeId;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/polynomial/quadratic.d.ts
|
|
56
|
+
/**
|
|
57
|
+
* A quadratic polynomial.
|
|
58
|
+
*
|
|
59
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
60
|
+
*
|
|
61
|
+
* The `Traits` type parameter is a phantom marker that accumulates trait
|
|
62
|
+
* brands as the polynomial is refined via `isMonotonic` / `asMonotonic` and
|
|
63
|
+
* friends. Refinements may be parameterized by an `Interval` — a quadratic is
|
|
64
|
+
* monotonic on an interval that avoids its extremum, even though it is not
|
|
65
|
+
* monotonic globally.
|
|
66
|
+
*
|
|
67
|
+
* @since 1.0.0
|
|
68
|
+
*/
|
|
69
|
+
interface QuadraticPolynomial<out Traits = unknown> extends Pipeable {
|
|
70
|
+
readonly [QuadraticPolynomialTypeId]: QuadraticPolynomialTypeId;
|
|
71
|
+
readonly [PolynomialTraits]: Traits;
|
|
72
|
+
/**
|
|
73
|
+
* The coefficient of the x^0 term.
|
|
74
|
+
*/
|
|
75
|
+
readonly c0: number;
|
|
76
|
+
/**
|
|
77
|
+
* The coefficient of the x^1 term.
|
|
78
|
+
*/
|
|
79
|
+
readonly c1: number;
|
|
80
|
+
/**
|
|
81
|
+
* The coefficient of the x^2 term.
|
|
82
|
+
*/
|
|
83
|
+
readonly c2: number;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/polynomial/cubic.d.ts
|
|
87
|
+
/**
|
|
88
|
+
* A cubic polynomial.
|
|
89
|
+
*
|
|
90
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
91
|
+
*
|
|
92
|
+
* The `Traits` type parameter is a phantom marker that accumulates trait
|
|
93
|
+
* brands as the polynomial is refined via `isMonotonic` / `asMonotonic` and
|
|
94
|
+
* friends. A cubic is monotonic only over an interval that avoids both of its
|
|
95
|
+
* extrema (or globally, when c2 = c3 = 0 and c1 ≠ 0).
|
|
96
|
+
*
|
|
97
|
+
* @since 1.0.0
|
|
98
|
+
*/
|
|
99
|
+
interface CubicPolynomial<out Traits = unknown> extends Pipeable {
|
|
100
|
+
readonly [CubicPolynomialTypeId]: CubicPolynomialTypeId;
|
|
101
|
+
readonly [PolynomialTraits]: Traits;
|
|
102
|
+
/**
|
|
103
|
+
* The coefficient of the x^0 term.
|
|
104
|
+
*/
|
|
105
|
+
readonly c0: number;
|
|
106
|
+
/**
|
|
107
|
+
* The coefficient of the x^1 term.
|
|
108
|
+
*/
|
|
109
|
+
readonly c1: number;
|
|
110
|
+
/**
|
|
111
|
+
* The coefficient of the x^2 term.
|
|
112
|
+
*/
|
|
113
|
+
readonly c2: number;
|
|
114
|
+
/**
|
|
115
|
+
* The coefficient of the x^3 term.
|
|
116
|
+
*/
|
|
117
|
+
readonly c3: number;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
export { QuadraticPolynomial as n, LinearPolynomial as r, CubicPolynomial as t };
|
|
121
|
+
//# sourceMappingURL=cubic-DkBqcZf-.d.mts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { t as Pipeable } from "./utils-MCckigYk.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/interval/interval.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The structural minimum: any value with numeric `start` and `end` fields.
|
|
6
|
+
*
|
|
7
|
+
* Operations that don't read endpoint inclusivity (e.g. `lerp`, `normalize`,
|
|
8
|
+
* `remap`, `size`) accept `Bounds` so the signature itself documents what
|
|
9
|
+
* the operation depends on.
|
|
10
|
+
*
|
|
11
|
+
* @since 2.0.0
|
|
12
|
+
*/
|
|
13
|
+
interface Bounds {
|
|
14
|
+
readonly start: number;
|
|
15
|
+
readonly end: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A mathematical interval. Discriminated union of four variants by endpoint
|
|
19
|
+
* inclusivity: `Closed`, `OpenStart`, `OpenEnd`, `Open`. Operations that
|
|
20
|
+
* depend on inclusivity (e.g. `contains`, `filter`, `equals`) dispatch on
|
|
21
|
+
* the `kind` field; operations that don't accept the broader `Bounds` type.
|
|
22
|
+
*
|
|
23
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
24
|
+
*
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
type Interval = Closed | OpenStart | OpenEnd | Open;
|
|
28
|
+
/**
|
|
29
|
+
* `[start, end]` — both endpoints included.
|
|
30
|
+
*
|
|
31
|
+
* @since 2.0.0
|
|
32
|
+
*/
|
|
33
|
+
interface Closed extends Pipeable, Bounds {
|
|
34
|
+
readonly kind: 'closed';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* `(start, end]` — start excluded, end included.
|
|
38
|
+
*
|
|
39
|
+
* @since 2.0.0
|
|
40
|
+
*/
|
|
41
|
+
interface OpenStart extends Pipeable, Bounds {
|
|
42
|
+
readonly kind: 'open-start';
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `[start, end)` — start included, end excluded.
|
|
46
|
+
*
|
|
47
|
+
* @since 2.0.0
|
|
48
|
+
*/
|
|
49
|
+
interface OpenEnd extends Pipeable, Bounds {
|
|
50
|
+
readonly kind: 'open-end';
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* `(start, end)` — both endpoints excluded.
|
|
54
|
+
*
|
|
55
|
+
* @since 2.0.0
|
|
56
|
+
*/
|
|
57
|
+
interface Open extends Pipeable, Bounds {
|
|
58
|
+
readonly kind: 'open';
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Interval as t };
|
|
62
|
+
//# sourceMappingURL=interval-Bhzeqp8M.d.mts.map
|
|
@@ -344,7 +344,7 @@ const unit = unit$1;
|
|
|
344
344
|
* convenient for "strict interior" use cases such as filtering roots that
|
|
345
345
|
* must lie strictly inside the unit parameter range.
|
|
346
346
|
*
|
|
347
|
-
* @since 2.
|
|
347
|
+
* @since 2.0.0
|
|
348
348
|
*/
|
|
349
349
|
const unitOpen = unitOpen$1;
|
|
350
350
|
/**
|
|
@@ -418,4 +418,4 @@ const scaleShift = scaleShift$1;
|
|
|
418
418
|
//#endregion
|
|
419
419
|
export { filter as a, make as c, toOpen as d, union as f, equals as i, scaleShift as l, unitOpen as m, contains as n, fromMinMax as o, unit as p, containsInterval as r, interval_exports as s, biunit as t, size as u };
|
|
420
420
|
|
|
421
|
-
//# sourceMappingURL=interval-
|
|
421
|
+
//# sourceMappingURL=interval-X1EYuf-T.mjs.map
|