Your algorithm seems ok for a simple linear scroll. However your link points to scrolls using various easing functions.
Easing functions do not scroll by the same amount each time, but increase or decrease is order to look like they're speeding up, or slowing down.
A common way to work out easing values is to use the result of a sine. If you picture a sine wave and imagine that you can only see one pixel of it at a time, as the wave progresses, the pixel will "ease" at the extremes and accelerate through the middle values.
Your Easing 2 animation is just adding a bit of bounce at the start and end, this is easily achievable by using the a bit of the sine wave past the extremes at each end. eg.
_
/ \
/
\_/
If you want some code, I answered a similar question here in C#.