X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsupport%2Fcubicinterp.cpp;h=8d0c62cbc9dd28bbac59a5d43db85ba9c8d94d9b;hp=fa51f7b47fd52f15ee6a5dcf6c48925922c943cf;hb=69f17e3b960107d7d0f0224acd860d3a212e602a;hpb=5e2332e2d4cacd81f208f3d2f9dc6a1eff4f849e diff --git a/libctsupport/cubicinterp.cpp b/libctsupport/cubicinterp.cpp index fa51f7b..8d0c62c 100644 --- a/libctsupport/cubicinterp.cpp +++ b/libctsupport/cubicinterp.cpp @@ -2,7 +2,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: cubicinterp.cpp,v 1.3 2001/02/09 14:34:16 kevin Exp $ +** $Id: cubicinterp.cpp,v 1.4 2001/02/09 21:27:51 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -37,7 +37,8 @@ CubicInterpolator::CubicInterpolator (const double* const y, const int n) double* temp = new double [n - 1]; temp[0] = 0; - for (int i = 1; i < n - 1; i++) { + int i; + for (i = 1; i < n - 1; i++) { double t = 2 + (0.5 * m_pdY2[i-1]); temp[i] = y[i+1] + y[i-1] - y[i] - y[i]; temp[i] = (3 * temp[i] - 0.5 * temp[i-1]) / t;