Adding getMidPoint for calculating mid point of a list of points.