@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
21 lines • 1.06 kB
TypeScript
/**
* Multiplies two polynomials given in coefficient-array form.
*
* out(x) = a(x) * b(x)
*
* Coefficient layout: index i is the coefficient of x^i (ascending). The
* result has length `a_len + b_len - 1`. The first `out_len` entries of
* `out` are written; entries beyond that are not touched.
*
* `out` must not alias `a` or `b` — the routine writes into `out` while it
* still reads from the inputs.
*
* @param {number[]|Float64Array|Float32Array} out destination, length >= a_len + b_len - 1
* @param {number[]|Float64Array|Float32Array} a
* @param {number} a_len number of coefficients in a
* @param {number[]|Float64Array|Float32Array} b
* @param {number} b_len number of coefficients in b
* @returns {number} number of coefficients written into `out` (a_len + b_len - 1)
*/
export function polynomial_multiply(out: number[] | Float64Array | Float32Array, a: number[] | Float64Array | Float32Array, a_len: number, b: number[] | Float64Array | Float32Array, b_len: number): number;
//# sourceMappingURL=polynomial_multiply.d.ts.map