Beispiel #1
0
        /// <summary>
        /// Obtain the extents for a list of vectors.
        /// </summary>
        /// <param name="vectors">list of vectors</param>
        /// <returns>array of extents (not sorted)</returns>
        /// <seealso cref="Extent(Vector2)"/>
        public static double[] Extents(IList <Vector2> vectors)
        {
            int n = vectors.Count;

            double[] extents = new double[n];
            for (int i = 0; i < n; i++)
            {
                extents[i] = VecmathUtil.Extent(vectors[i]);
            }
            return(extents);
        }
Beispiel #2
0
 public void SweepSouth()
 {
     Assert.AreEqual(Vectors.DegreeToRadian(270), VecmathUtil.Extent(new Vector2(0, -1)), 0.01);
 }
Beispiel #3
0
 public void SweepWest()
 {
     Assert.AreEqual(Vectors.DegreeToRadian(180), VecmathUtil.Extent(new Vector2(-1, 0)), 0.01);
 }