Interpolation methodsNumber or Array linear(t, val1, val2) {t is a number, and val1 and val2 are numbers or arrays} The resulting value linearly interpolates from val1 to val2 as t ranges from 0 to 1. When t is l <= 0, the result is val1, and when t is >= 1, it is val2. Number or Array linear(t, tmin, tmax, val1, val2) {t, tmin, and tmax are numbers, and val1 and val2 are numbers or arrays} When t <= tmin, the output is val1. When t >= tmax, the output is val2. While tmin < t < tmax, the resulting output is a linear combination of val1 and val2. Number or Array ease(t, val1, val2) {t is a number, and val1 and val2 are numbers or arrays} Similar to linear, except that the interpolation eases in and out so that the velocity is 0 at the start and end points. This method results in a very smooth animation. Number or Array ease(t, tmin, tmax, val1, val2) {t, tmin, and tmax are numbers, and val1 and val2 are numbers or arrays} Similar to linear, except that the interpolation eases in and out so that the velocity is 0 at the start and end points. This method results in a very smooth animation. Number or Array ease_in(t, val1, val2) {t is a number, and val1 and val2 are numbers or arrays} Similar to ease, except that the tangent is 0 only on the val1 side and is linear on the val2 side. Number or Array ease_in(t, tmin, tmax, val1, val2) {t, tmin, and tmax are numbers, and val1 and val2 are numbers or arrays} Similar to ease, except that the tangent is 0 only on the tmin side and is linear on the tmax side. Number or Array ease_out(t, val1, val2) {t is a number, and val1 and val2 are numbers or arrays} Similar to ease, except that the tangent is 0 only on the val2 side and is linear on the val1 side. Number or Array ease_out(t, tmin, tmax, val1, val2) {t, tmin, and tmax are numbers, and val1 and val2 are numbers or arrays} Similar to ease, except that the tangent is 0 only on the tmax side and is linear on the tmin side. |