calculating the gradient of a straight line