given a straight line between two points a and b