Mapsui.Geometries.MultiPoint.GetBoundingBox C# (CSharp) Method

GetBoundingBox() public method

The minimum bounding box for this Geometry.
public GetBoundingBox ( ) : BoundingBox
return BoundingBox
        public override BoundingBox GetBoundingBox()
        {
            if ((Points == null) || (Points.Count == 0))
                return null;
            var bbox = new BoundingBox(Points[0], Points[0]);
            for (var i = 1; i < Points.Count; i++)
            {
                bbox.Min.X = Points[i].X < bbox.Min.X ? Points[i].X : bbox.Min.X;
                bbox.Min.Y = Points[i].Y < bbox.Min.Y ? Points[i].Y : bbox.Min.Y;
                bbox.Max.X = Points[i].X > bbox.Max.X ? Points[i].X : bbox.Max.X;
                bbox.Max.Y = Points[i].Y > bbox.Max.Y ? Points[i].Y : bbox.Max.Y;
            }
            return bbox;
        }