#interpolation
2 APIs with this tag
Interpolation API
Interpolation maths as an API, computed locally and deterministically. The linear endpoint interpolates between two points, y = y0 + (y1 − y0)·(x − x0)/(x1 − x0), returning the value at a target x (or, given a target y, solving the x that produces it), the parameter t and whether the point lies outside the segment. The table endpoint does piecewise-linear interpolation within a table of (x, y) points supplied as comma-separated lists — it sorts the points, finds the two that bracket your query and interpolates between them, extending the nearest segment and flagging the result when you query outside the data range, ideal for calibration curves and lookup tables. The bilinear endpoint interpolates on a rectangular grid from four corner values, interpolating along x at each y-edge and then along y. Everything is computed locally and deterministically, so it is instant and private, and unlike regression it passes exactly through the supplied points. Ideal for engineering, data-visualisation, gaming, mapping and scientific-computing app developers, lookup-table and calibration tools, and numerical-methods education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is interpolation; for least-squares regression and correlation use a statistics API.
api.oanor.com/interpolation-api
Range Remap API
Map numbers between ranges. The scale endpoint linearly maps a value from an input range [in_min, in_max] onto an output range [out_min, out_max] — the classic map() you reach for with sensor readings, sliders and knobs, gauges and progress bars, and data-visualisation axes. It also returns the 0–1 position t, so with the default 0–1 output range it normalizes a value, and with a 0–1 input range it interpolates (lerp); output ranges may be reversed (out_min greater than out_max) to invert direction, and an optional clamp keeps the result inside the output range instead of extrapolating. The clamp endpoint constrains a value to a minimum and maximum and can additionally snap it to the nearest step. Everything is exact local maths, instant and deterministic. Ideal for IoT and embedded (Arduino-style map), audio and DSP, graphics and game development, dashboards and charts, and UI controls. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This maps scalar values — for interpolating vectors use a vector API and for animation easing curves use an easing API.
api.oanor.com/remap-api