import type { array } from "../types"; /** * Linear interpolation. * * Linear interpolation. Returns the 1-D value of Y, given Xi query points. * * @param x sample points (must be sorted in ascending order) * @param y corresponding values of sample points * @param xnew new query points for interpolation * @return Interpolated values * * @example Interpolate at specific points * ```ts * import { assertEquals } from "jsr:@std/assert"; * * var x = [1,2,3,4,5,6]; * var y = [2,4,6,8,10,12]; * assertEquals(interp1(x,y,[2,4,6]), [4, 8, 12]); * * ``` * * @example Interpolate at a single point * ```ts * import { assertEquals } from "jsr:@std/assert"; * * var x = [1,2,3,4,5,6]; * var y = [2,4,6,8,10,12]; * * assertEquals(interp1(x,y,3), 6); * * ``` * * @example Interpolate between points * ```ts * import { assertEquals } from "jsr:@std/assert"; * * var x = [1,2,3,4,5,6]; * var y = [2,4,6,8,10,12]; * * assertEquals(interp1(x,y,3.5), 7); * ``` */ export default function interp1(x: array, y: array, xnew: number | array): number | array; //# sourceMappingURL=interp1.d.ts.map