コード例 #1
0
        public static (XY min, XY max) MinMax(this ReadOnlySpan <XY> points)
        {
            var min = new XY(float.PositiveInfinity);
            var max = new XY(float.NegativeInfinity);

            foreach (var p in points)
            {
                min = XY.Min(min, p);
                max = XY.Max(max, p);
            }

            return(min, max);
        }