Function IntpoSpl(ByVal X As Double, TY() As Double) As Double
Dim N As Long
N = Int(X): IntpoSpl = Fx0à1Splm1p2(X - N, TY(N - 1), TY(N), TY(N + 1), TY(N + 2))
End Function
Function Fx0à1Splm1p2(ByVal X As Double, ByVal Ym As Double, ByVal Y0 As Double, ByVal Y1 As Double, ByVal Y2 As Double) As Double
Fx0à1Splm1p2 = Fx0à1Spl3(X, Y0, Y1, (Y1 - Ym) / 2, (Y2 - Y0) / 2)
End Function
Function Fx0à1Spl3(ByVal X As Double, ByVal Y0 As Double, ByVal Y1 As Double, _
ByVal d0 As Double, ByVal d1 As Double) As Double
Fx0à1Spl3 = (((Y1 - Y0) * (3 - 2 * X) + d0 * (X - 2) + d1 * (X - 1)) * X + d0) * X + Y0
End Function