interpolateDoubleArray function
Creates a double array interpolator between a and b.
Implementation
Interpolator<List<double>> interpolateDoubleArray(
List<double> a, List<double> b) {
assert(a.length == b.length, 'Arrays must have the same length');
final n = a.length;
return (double t) {
final result = List<double>.filled(n, 0);
for (int i = 0; i < n; i++) {
result[i] = a[i] + (b[i] - a[i]) * t;
}
return result;
};
}