Implemented the approach, approach_angle and lerp_angle functions, and created test cases for them.
Additionally, created demonstrations comparing lerp/lerp_angle and approach/approach_angle for reaching specific values. The user can also pick different lerp amounts and approach steps as well.
There is also a demonstration of using compounded lerp x approach for using lerp, and then approach to reach the value. This is useful when someone wants to cover both large and small differences in a short time (lerp excels at the former, approach at the latter), reaching a quick stabilisation point (when current value equals to the target). This is especially visible for the number-changing demo, but also can be handy for position changing (e.g. when you move camera to follow the player, and it needs to quickly stabilise to avoid the annoying jitter towards the end).
That said, the "lerp x approach" function doesn't involve any separate function, it just compounds lerp/approach or lerp_angle/approach_angle.
Resolving issues #3 and #15.
Implemented the
approach
,approach_angle
andlerp_angle
functions, and created test cases for them.Additionally, created demonstrations comparing lerp/lerp_angle and approach/approach_angle for reaching specific values. The user can also pick different lerp amounts and approach steps as well.
There is also a demonstration of using compounded lerp x approach for using
lerp
, and thenapproach
to reach the value. This is useful when someone wants to cover both large and small differences in a short time (lerp excels at the former, approach at the latter), reaching a quick stabilisation point (when current value equals to the target). This is especially visible for the number-changing demo, but also can be handy for position changing (e.g. when you move camera to follow the player, and it needs to quickly stabilise to avoid the annoying jitter towards the end).That said, the "lerp x approach" function doesn't involve any separate function, it just compounds lerp/approach or lerp_angle/approach_angle.