@js-draw/math
Version:
A math library for js-draw.
10 lines (9 loc) • 345 B
TypeScript
/**
* Solves an equation of the form ax² + bx + c = 0.
* The larger solution is returned first.
*
* If there are no solutions, returns `[NaN, NaN]`. If there is one solution,
* repeats the solution twice in the result.
*/
declare const solveQuadratic: (a: number, b: number, c: number) => [number, number];
export default solveQuadratic;