@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
13 lines • 732 B
TypeScript
/**
* Return solutions for a quadratic polynomial: ax² + bx + c
* Typically there will be 2 solution, in some cases we will have 0, having 1 solution is impossible
* This solver only deals with real numbers, so imaginary solution are not provided. In case solution would be imaginary - we return 0 roots
* @param {number} a
* @param {number} b
* @param {number} c
* @param {number[]} result solutions are written here
* @param {number} result_offset offset into result array where solutions are written to
* @returns {number} number of found solutions (roots)
*/
export function solveQuadratic(result: number[], result_offset: number, a: number, b: number, c: number): number;
//# sourceMappingURL=solveQuadratic.d.ts.map