It’s superseded since smooth scrolling is now a feature, but you’d have more control over the scrolling with it.
Now I haven’t used it myself so I’m not sure if it still works as intended, but in that case, reading over the code should point you in the right direction