Open phatcher opened 10 years ago
I think that would be a useful addition, so, please do submit a pull request!
I suppose we do not want to change the current behavior of interpolateLinear
, or add additional parameters, but we could have a more flexible function interpolateLinearUsing
that takes the extrapolation behavior as an additional argument (or, I thought, we could call it extrapolation, but that does not really makes sense as the function does both).
When you use Stats.interpolateLinear and the new key list extended earlier or later than the original, then the function uses the low/high value from the original list.
I think this should be extended so that the behaviour is customisable, three obvious choices are...
I can have a go at producing a patch if you think this is worthwhile?