Hacker News new | past | comments | ask | show | jobs | submit login

The feedback to this article seems hyperbolically vicious. But frontend web dev always feels like a field with a lot of very sharp opinions about things.

In some contexts, yes using Lerp to go half way to a target can lead to running forever which can cause timing bugs. If you lerp halfway to a specific point each frame and trigger an event when you reach that point then it runs infinitely. In practice it just runs until the rounding error goes to zero, but the timing for this can be weird and it adds an unwanted delay. I once spent ~2 days changing all the animations in a program to switch from using this type of smoothing to using lerp on an animation curve with a definite time duration. Exponential filters are good for smoothing a continuous parameter, but they should not be used on a bounded interval where the end point matters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: