Preliminary tests work for algorithm.
Also wrote test data generator spreadsheet.
Spreadsheet works for +'ve slopes, but not
-'ve ones.  Sort this out, and do more tests.
Think of clever tests before continuing.