Length of a line segment. Midpoint of a line segment