Constrained random points on a circle: Difference between revisions
Content added Content deleted
(→{{header|C sharp|C#}}: r.Next(403) should be r.Next(404) as the parameter is an exclusive upper-bound.) |
|||
Line 525: | Line 525: | ||
for (int count = 0; count < 100; count++) |
for (int count = 0; count < 100; count++) |
||
{ |
{ |
||
var p = points[r.Next( |
var p = points[r.Next(404)]; |
||
g.FillEllipse(brush, new Rectangle(290 + 19 * p.X, 290 + 19 * p.Y, 10, 10)); |
g.FillEllipse(brush, new Rectangle(290 + 19 * p.X, 290 + 19 * p.Y, 10, 10)); |
||
} |
} |