ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
10 lines (9 loc) • 480 B
TypeScript
/**
* Finds the roots of a parametric cubic equation in `t`,
* where `t` lies in the interval of `[0,1]`.
* Returns an array of parametric intersection locations along the cubic,
* excluding out-of-bounds intersections (before or after the end point
* or in the imaginary plane).
* An adaptation of http://www.particleincell.com/blog/2013/cubic-line-intersection/
*/
export declare function cubicRoots(a: number, b: number, c: number, d: number, delta?: number): number[];