Beispiel #1
0
        public static AAB2 CreateFromPoints(Vector2[] points)
        {
            int num = points.Length;

            if (num > 0)
            {
                AAB2 result = AAB2.CreateFromPoint(ref points[0]);
                for (int i = 1; i < num; i++)
                {
                    result.Include(ref points[i]);
                }
                return(result);
            }
            return(default(AAB2));
        }
Beispiel #2
0
        public static AAB2 CreateFromPoints(IList <Vector2> points)
        {
            int count = points.Count;

            if (count > 0)
            {
                AAB2 result = AAB2.CreateFromPoint(points[0]);
                for (int i = 1; i < count; i++)
                {
                    result.Include(points[i]);
                }
                return(result);
            }
            return(default(AAB2));
        }
Beispiel #3
0
        public static AAB2 CreateFromPoints(IEnumerable <Vector2> points)
        {
            IEnumerator <Vector2> enumerator = points.GetEnumerator();

            enumerator.Reset();
            if (!enumerator.MoveNext())
            {
                return(default(AAB2));
            }
            AAB2 result = AAB2.CreateFromPoint(enumerator.Current);

            while (enumerator.MoveNext())
            {
                result.Include(enumerator.Current);
            }
            return(result);
        }