The minimium value of the oscillation
The maximum value of the oscillation
The time
Optional
p: number = 1The period (must be nonzero)
Optional
f: ((x) => number) = Math.cosThe periodic function (its period must be 2π)
((b - a) * (f(2π * t / p) + 1) / 2) + a
Returns the value of the oscillation between
a
andb
at timet
.