@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
17 lines • 918 B
TypeScript
/**
* Compute bounds of a 3-rd degree hermite curve
* Note that this is a 1d case solver
* Lower bound will be written into result[offset], upper bounds will be written into result[offset+result_stride]
* Solution is based on https://stackoverflow.com/questions/24809978/calculating-the-bounding-box-of-cubic-bezier-curve
* Differentiation of hermite polynomial is done in WolframAlpha
* 0 = 3 t^2 (m0 + m1 + 2 p0 - 2 p1) - 2 t (2 m0 + m1 + 3 p0 - 3 p1) + m0
* @param {number[]|Float32Array} result
* @param {number} result_offset offset into the result array
* @param {number} result_stride
* @param {number} p0
* @param {number} p1
* @param {number} m0
* @param {number} m1
*/
export function spline_hermite3_bounds(result: number[] | Float32Array, result_offset: number, result_stride: number, p0: number, p1: number, m0: number, m1: number): void;
//# sourceMappingURL=spline_hermite3_bounds.d.ts.map