MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / linear_interpolation

Function linear_interpolation

src/math/interpolation.rs:6–8  ·  view source on GitHub ↗

In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points. Formula: y = y0 + (x - x0) * (y1 - y0) / (x1 - x0) Source: https://en.wikipedia.org/wiki/Linear_interpolation point0 and point1 are a tuple containing x and y values we want to interpolate between

(x: f64, point0: (f64, f64), point1: (f64, f64))

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

test_linear_intepolationFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_linear_intepolationFunction · 0.68