Distance and slope of a line