Function shapeDistance

Return the distance between two shapes.