This is a utility function to calculate the bounding box of series of 2D points