Interpolate between two values (number, number[], or string) by progress.
number[]
Handles all RPE value types:
%P%
start
progress >= 1
end
Start value.
End value.
Progress ∈ [0, 1].
Interpolated value; type matches the input types.
calculateValue(0, 255, 0.5); // 127.5calculateValue([255, 0, 0], [0, 0, 255], 0.5); // [127.5, 0, 127.5]calculateValue('%P%0', '%P%100', 0.3); // '30'calculateValue('Hello', 'Hello World', 0.5); // 'Hello Wor' Copy
calculateValue(0, 255, 0.5); // 127.5calculateValue([255, 0, 0], [0, 0, 255], 0.5); // [127.5, 0, 127.5]calculateValue('%P%0', '%P%100', 0.3); // '30'calculateValue('Hello', 'Hello World', 0.5); // 'Hello Wor'
Interpolate between two values (number,
number[], or string) by progress.Handles all RPE value types:
%P%markers: interpolates the embedded number.startuntilprogress >= 1, thenend.