Expand description
Piecewise linear interpolation and the pillar bracketing shared by curves and smiles.
Functions§
- bracket
- Bracket
xin the sorted pillar gridxs: returns(idx, w)wherexs[idx - 1] <= x <= xs[idx]andwis the weight of the upper pillar.xis clamped to the grid, soidxis always in[1, xs.len() - 1]andwin[0, 1]. - interp_
pairs linear_interpover(x, y)pairs sorted byx— the smile storage shape.- lerp
- Linear blend
a + w (b - a). - linear_
interp - Piecewise linear interpolation of
(xs, ys)atx, flat beyond the ends.xsmust be sorted strictly increasing.