Exemple #1
0
 /// <summary>
 /// Creates "count" rectangles and adds to "rects" list
 /// </summary>
 /// <param name="rects">list of rectangles to add to</param>
 /// <param name="count">how many rectangles will be created</param>
 static void CreateSomeRectangles(IPut<Rectangle> rects, int count)
 {
     for (int index = 0; index < count; index++)
     {
         rects.Add(new Rectangle(
             rnd.NextDouble() * rnd.Next(MAX_DIMENSION),
             rnd.NextDouble() * rnd.Next(MAX_DIMENSION)));
     }
 }
Exemple #2
0
 /// <summary>
 /// Creates "count" circles and adds to "circles" list
 /// </summary>
 /// <param name="rects">list of circles to add to</param>
 /// <param name="count">how many circles will be created</param>
 static void CreateSomeCircles(IPut<Circle> circles, int count)
 {
     for (int index = 0; index < count; index++)
     {
         circles.Add(new Circle(
             rnd.NextDouble() * rnd.Next(MAX_DIMENSION)));
     }
 }