use abs() and diff-based comparisons, since it's signed
Merge pull request #6 from KWillets/master

use abs() and diff-based comparisons, since it's signed