Swift port of Bill Dudney's original TrackBall Objective-C source code