UNPKG

@js-draw/math

Version:
10 lines (9 loc) 345 B
/** * 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;