How to determine the slope between two points