@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
15 lines • 717 B
TypeScript
/**
* Return real solutions for a cubic polynomial: ax³ + bx² + cx + d
* Repeated roots are written once each — multiplicity is not duplicated in the output.
* Imaginary roots are not provided.
*
* @param {number[]|Float32Array|Float64Array} result solutions are written here
* @param {number} result_offset offset into result array where solutions are written to
* @param {number} a
* @param {number} b
* @param {number} c
* @param {number} d
* @returns {number} number of real roots found (0, 1, 2, or 3)
*/
export function solveCubic(result: number[] | Float32Array | Float64Array, result_offset: number, a: number, b: number, c: number, d: number): number;
//# sourceMappingURL=solveCubic.d.ts.map