/// <summary> /// Checks if the given pixel is located /// within the given rectangle. /// </summary> /// <param name="Pixel">A pixel of type T.</param> /// <param name="Circle">A circle of type T.</param> /// <returns>True if the pixel is located within the given circle; False otherwise.</returns> public static Boolean IsInCircle <T>(this IPixel <T> Pixel, ICircle <T> Circle) where T : IEquatable <T>, IComparable <T>, IComparable { #region Initial Checks if (Pixel == null) { throw new ArgumentNullException("The given first pixel must not be null!"); } if (Circle == null) { throw new ArgumentNullException("The given first edgepixel must not be null!"); } #endregion return(Circle.Contains(Pixel)); }