/// <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); }
public void SweepSouth() { Assert.AreEqual(Vectors.DegreeToRadian(270), VecmathUtil.Extent(new Vector2(0, -1)), 0.01); }
public void SweepWest() { Assert.AreEqual(Vectors.DegreeToRadian(180), VecmathUtil.Extent(new Vector2(-1, 0)), 0.01); }