lerp: Linear Interpolation

Description Usage Arguments Value

View source: R/transition.R

Description

Linear interpolation between two points on a curve. May be faster than base R function since only two points are used for interpolation.

Usage

1
lerp(x, x1, x2, y1, y2)

Arguments

x

Input value to interpolate corresponding location on a curve.

x1

Lower x bound for curve y~x.

x2

Upper x bound for curve y~x.

y1

Lower y value given x1 for curve y~x.

y2

Upper y value given x2 for curve y~x.

Value

An interpolated value given two points on a curve.


austinnam/modeltools documentation built on Aug. 3, 2019, 7:20 p.m.