Interpolates between A->B over duration.
Given the same A & B values, steps will be larger if it's a longer
duration, and shorter if it's a smaller duration.
A function is returned, which when invoked yields a value between A..B.
Alternatively to step through by the same amount regardless
of time, use interpolatorStepped.
// Interpolate from 0..1 over one minute constv = interpolatorInterval({mins:1}); v(); // Compute current value
Use start and end points:
// Interpolate from 100-200 over 10 seconds constv = interpolatorInterval({secs:10}, 100, 200); v(); // Compute current value
Interpolates between A->B over
duration
. Given the same A & B values, steps will be larger if it's a longer duration, and shorter if it's a smaller duration.A function is returned, which when invoked yields a value between A..B.
Alternatively to step through by the same amount regardless of time, use interpolatorStepped.
Use start and end points: