Updates mouse motion measurement logic to use straight-line distance

Fixes #13.