Interpolate

Function

Interpolate(x, x1, x2, y1, y2)

x
x1
x2
y1
y2

Interpolate is included by default in each file as part of the Math library.

 

See also:


Use

The Interpolate() function returns a y value given an x value and two sets of x/y pairs. It performs classic interpolation given all of the inputs as individual values.

If defined as a custom function in Blockpad, it would look like this:

Examples
  • Interpolate(13, 10, 20, 0, 10)  = 3
  • Interpolate(4 ft, 0ft, 100ft, 0 lb, 10lb)  = 0.4 lb