Ts: fix buggy derivative cases, and improve test coverage.
Derivatives are supposed to reflect what happens in value evaluation. There
were several cases where derivatives disagreed with the curve shape given by
value evaluation.
Most of these cases involved linear and/or held knots.
Some example cases - not an exhaustive list:
- Derviatives at all linear knots were incorrectly evaluated from one of the
spline's extrapolation slopes.
- Ineffective tangent values on linear and held knots were incorrectly being
considered at neighboring knots.
- Ineffective extrapolation-facing tangent values on Bezier knots were
incorrectly being returned verbatim, even when held extrapolation means that
these slopes are zero. This was the only case involving Bezier knots.
This change completely rewrites Ts_Eval, and partially rewrites some of its
helpers. Some test baselines that codified the incorrect behavior have been
updated.
Add testTsDerivatives. I believe this covers all possible derivative cases.
Derivatives are well-defined for value types that are, in the language of
TsTraits, extrapolatable. This is a bit of a misnomer. It is true that
"extrapolatable" means "we will perform extrapolation". But it also means "we
can determine a slope".
(Internal change:
2313969)