spline_hermite3_bounds
spline_hermite3_bounds(result, result_offset, result_stride, p0, p1, m0, m1)
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
Kind: global function
Param | Type | Description |
---|---|---|
result | Array.<number> | Float32Array | |
result_offset | number | offset into the result array |
result_stride | number | |
p0 | number | |
p1 | number | |
m0 | number | |
m1 | number |