Skip to content

Instantly share code, notes, and snippets.

@aj0strow
Created March 2, 2016 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aj0strow/badb75f0a120b2cfc5bf to your computer and use it in GitHub Desktop.
Save aj0strow/badb75f0a120b2cfc5bf to your computer and use it in GitHub Desktop.
Private Function LinearInterpolate(ByVal x2 As Integer, ByVal y2 As Double,
ByVal x3 As Integer, ByVal y3 As Double) As Double
Try
LinearInterpolate = ((y2 - y3) / (x2 - x3)) * x2 + y2
Catch ex As Exception
SharedLogger.LogException(_moduleID & ":LI", ex) 'Log any exceptions.
LinearInterpolate = (y2 + y3) / 2
End Try
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment