If the starting and ending views are centered on the same point, but the ending width is smaller, the .duration property of the returned interpolator is negative. See https://observablehq.com/d/fa1442202b6a7936
Comparing to van Wijk and Nuij, the current code is missing the absolute value on the path length S.

Skipping the absolute value does simplify the interpolator (no need to track the k factor). I think it would be enough to take the absolute value when computing the duration.