#interpolation
2 APIs con questa etichetta
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
Mapeia números entre intervalos. O endpoint scale mapeia linearmente um valor de um intervalo de entrada [in_min, in_max] para um intervalo de saída [out_min, out_max] — o clássico map() que você usa com leituras de sensores, sliders e knobs, medidores e barras de progresso, e eixos de visualização de dados. Ele também retorna a posição t de 0 a 1, então com o intervalo de saída padrão 0–1 ele normaliza um valor, e com um intervalo de entrada 0–1 ele interpola (lerp); intervalos de saída podem ser invertidos (out_min maior que out_max) para inverter a direção, e um clamp opcional mantém o resultado dentro do intervalo de saída em vez de extrapolar. O endpoint clamp restringe um valor a um mínimo e máximo e pode adicionalmente ajustá-lo ao passo mais próximo. Tudo é matemática local exata, instantânea e determinística. Ideal para IoT e embarcados (estilo Arduino map), áudio e DSP, gráficos e desenvolvimento de jogos, dashboards e gráficos, e controles de UI. Computação local pura — sem chave, sem serviço de terceiros, instantâneo. Ao vivo, nada armazenado. 3 endpoints. Isto mapeia valores escalares — para interpolar vetores use uma API de vetores e para curvas de easing de animação use uma API de easing.
api.oanor.com/remap-api