return (a3 * mu * mu2 + a2 * mu2 + a1 * mu + a0);
}
private static Vector3 interpolateInArray(Vector3[] array, int i, double mu)
{
Vector3 point0 = array[i + 1];
Vector3 point1 = array[i];
Vector3 point2 = array[i - 1];
Vector3 point3 = array[i - 2];
double x = cubicInterpolate(point0.x, point1.x, point2.x, point3.x, mu);
double y = cubicInterpolate(point0.y, point1.y, point2.y, point3.y, mu);
double z = cubicInterpolate(point0.z, point1.z, point2.z, point3.z, mu);
return new Vector3(x, y, z);
}