Fixed index that would cause crash with two point, two derivative interpolation. Added static_cast.

This commit is contained in:
Jeff
2014-07-10 12:03:42 -06:00
parent 08c615f1e4
commit b1169ce40c
2 changed files with 2 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ void check_global_interpolation_with_derivatives2d()
VectorXd derivativeIndices(numPoints);
for (Eigen::DenseIndex i = 0; i < numPoints; ++i)
derivativeIndices(i) = i;
derivativeIndices(i) = static_cast<double>(i);
const Spline2d spline = SplineFitting<Spline2d>::InterpolateWithDerivatives(
points, derivatives, derivativeIndices, degree);