Skip to content

Instantly share code, notes, and snippets.

@carlos-jenkins
Created June 27, 2018 02:47
Show Gist options
  • Save carlos-jenkins/056b81bf28b935b7e4aeb55e53143f59 to your computer and use it in GitHub Desktop.
Save carlos-jenkins/056b81bf28b935b7e4aeb55e53143f59 to your computer and use it in GitHub Desktop.
Interpolation
def interpolate(x0, y0, x1, y1, x):
return (y0 * (x1 - x) + y1 * (x - x0)) / (x1 - x0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment