I implemented one myself recently. These are the steps I took.
- You need to measure the velocity of your cursor (either mouse cursor or finger)
- Implement a simple particle physics loop. Information about how to do that can be found here
- give your particle "bounds" using math derived from the width of your scrolling plane, and the width of your viewport
- continuously Add the the difference between the mouse velocity and the particle velocity, to the particle's velocity, so the particle's velocity "matches" the mouse's velocity for as long as it's moving.
- Stop doing step 4 as soon as the user lifts their finger. The physics loop takes care of inertia.
- Add your personal flourishes such as "bumper" margins, and smooth scrolling "anchor" points that operate on zeno's paradox for calculating motion.
- I nearly forgot: Take the coordinates derived from above, and use it as the location of your scrolling plane.
I will probably open source this code soon. How soon do you need this?
edit:changed the link. Sorry, pointed to slightly the wrong page. edit2: or not? Anyway, original page I linked to was first link on currently linked page.