Expand description
A simple but powerful polynomial library focused on interpolation between points. Works with both standard polynomials and parametric curves. Mostly no_std although a dynamic allocator is required.
Structs§
- PointXY
- A point with x and y coordinates.
- PointXYT
- A point with x, y, and t coordinates. t is usually the independent variable here.
- Polynomial
- A polynomial function.
- XYTCurve
- A smooth curve based on functions x(t) and y(t).
Functions§
- newtons_
method - Performs an iterative process to approximate the inverse of a function using its derivative at a
given y coordinate. (Solves f(x)=y for x at a given y.) This requires an initial “guess” at the
desired x value and a maximum number of iterations to perform when calculating it. The function
returns early if it detects that x has been calculated perfectly (
function(x)
returns exactlyy
). It may return NaN or infinity if the derivative returns 0 at one of the progressive estimates of x. The function returns (x, f(x)) and not (x, y) if they are different.