Tween
Easing
Animation Easing Functions.
Tween
Collection of tween utility methods.
calculate_progress
staticmethod
calculate_progress(
started_at: int,
duration: float,
easing: typing.Callable[[float], float],
) -> float
Calculate the progress of an ongoing tween, represented as a percentage.
| PARAMETER | DESCRIPTION |
|---|---|
started_at
|
The starting tick provided by
TYPE:
|
duration
|
The desired total time for the tween to take place in seconds.
TYPE:
|
easing
|
The desired easing function/method to use - Usually an |
| RETURNS | DESCRIPTION |
|---|---|
float
|
The percentage progress of this tween. |