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

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

            return(min, max);
        }
コード例 #2
0
        private XYZ _GetSize()
        {
            if (_Size.HasValue)
            {
                return(_Size.Value);
            }

            var min = _Landmarks.Aggregate((a, b) => XYZ.Min(a, b));
            var max = _Landmarks.Aggregate((a, b) => XYZ.Max(a, b));

            _Size = max - min;

            return(_Size.Value);
        }