/// <summary> /// Computes the upper bound of the specified <see cref="Coordinate" /> instances. /// </summary> /// <param name="coordinates">The coordinates.</param> /// <param name="precision">The precision model.</param> /// <returns>The upper bound of the specified <see cref="Coordinate" /> instances.</returns> public static Coordinate UpperBound(IEnumerable <Coordinate> coordinates, PrecisionModel precision) { if (precision == null) { precision = PrecisionModel.Default; } return(precision.MakePrecise(UpperBound(coordinates))); }
/// <summary> /// Sums the specified <see cref="CoordinateVector" /> instances. /// </summary> /// <param name="vectors">The vectors.</param> /// <param name="precision">The precision model.</param> /// <returns>The sum of the <paramref name="vectors" />.</returns> public static CoordinateVector Sum(IEnumerable <CoordinateVector> vectors, PrecisionModel precision) { if (precision == null) { precision = PrecisionModel.Default; } return(precision.MakePrecise(Sum(vectors))); }
/// <summary> /// Computes the centroid of the specified <see cref="Coordinate" /> instances. /// </summary> /// <param name="coordinates">The array of coordinates.</param> /// <param name="count">The number of coordinates taken from the array.</param> /// <param name="precision">The precision model.</param> /// <returns>The centroid of the specified <see cref="Coordinate" /> instances.</returns> /// <exception cref="System.ArgumentNullException">The coordinate array is null.</exception> /// <exception cref="System.ArgumentOutOfRangeException"> /// The count is negative. /// or /// The count is greater than the number of elements in the array. /// </exception> public static Coordinate Centroid(Coordinate[] coordinates, Int32 count, PrecisionModel precision) { if (precision == null) { precision = PrecisionModel.Default; } return(precision.MakePrecise(Centroid(coordinates, count))); }