Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Created April 22, 2015 16:17
Show Gist options
  • Save stevehenderson/02195aab45ab492dda2d to your computer and use it in GitHub Desktop.
Save stevehenderson/02195aab45ab492dda2d to your computer and use it in GitHub Desktop.
Malone capstone
'Now check result
If (closestDiff = 0) Then
'Perfect match
result = closestValue
Else
'Interpolate
Dim gap As Double
gap = closestDiff + closestDiff2
result = (1 - (closestDiff / gap)) * closestValue + (closestDiff2 / gap) * closestValue2
End If
valuePL2 = result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment